WooCommerce Tambahkan Data Bidang Kustom ke Halaman CART

add_filter( "woocommerce_add_cart_item_data", "cs_add_cart_item_data", 10,2 );
function cs_add_cart_item_data( $cart_item, $product_id ){

  /*
  Custom Field name="" attr
  */
  if ( isset($_POST['custom_field_name']) ) {
    $cart_item['custom_field_name'] = sanitize_text_field( $getRawVal );
  }
  return $cart_item;
}
Lonely Lynx