get_shipping_methods() return empty rate arary
-
Hello,
I have shipping methods that I created using Flexible Shipping plugins. I’ve added rule and rate for these methods.
But when I trying to get data of shipping methods usingWC()->shipping->get_shipping->methods();
It returns me empty rate array for every shipping method(Flat Rate, Local Pickup, Flexible Shipping).
Output is below :-[flexible_shipping] => WPDesk_Flexible_Shipping Object ( [default_method:WPDesk_Flexible_Shipping:private] => [message_added:WPDesk_Flexible_Shipping:private] => [supports] => Array ( [0] => shipping-zones [1] => instance-settings ) [id] => flexible_shipping [method_title] => Flexible Shipping [method_description] => Flexible Shipping [enabled] => yes [title] => Flexible Shipping [rates] => Array ( ) [tax_status] => taxable [fee] => [minimum_fee] => [instance_id] => 0 [instance_form_fields] => Array ( [0] => Array ( [title] => Flexible Shipping [type] => title [description] => See how to configure Flexible Shipping. ) [title] => Array ( [title] => Shipping title [type] => text [description] => Visible only to admin in WooCommerce settings. [default] => Flexible Shipping [desc_tip] => 1 ) [tax_status] => Array ( [title] => Tax Status [type] => select [class] => wc-enhanced-select [default] => taxable [options] => Array ( [taxable] => Taxable [none] => None ) ) [title_shipping_methods] => Array ( [title] => Shipping Methods [type] => title_shipping_methods [description] => ) [shipping_methods] => Array ( [title] => Shipping Methods [type] => shipping_methods [desc_tip] => 1 ) ) [instance_settings] => Array ( ) [availability] => [countries] => Array ( ) [plugin_id] => woocommerce_ [errors] => Array ( ) [settings] => Array ( [0] => [title] => Flexible Shipping [tax_status] => taxable [title_shipping_methods] => [shipping_methods] => [1] => [availability] => [type] => class ) [form_fields] => Array ( [0] => Array ( [title] => Flexible Shipping [type] => title [description] => See how to configure Flexible Shipping. ) [title] => Array ( [title] => Shipping title [type] => text [description] => Visible only to admin in WooCommerce settings. [default] => Flexible Shipping [desc_tip] => 1 ) [tax_status] => Array ( [title] => Tax Status [type] => select [class] => wc-enhanced-select [default] => taxable [options] => Array ( [taxable] => Taxable [none] => None ) ) [title_shipping_methods] => Array ( [title] => Shipping Methods [type] => title_shipping_methods [description] => ) [shipping_methods] => Array ( [title] => Shipping Methods [type] => shipping_methods [desc_tip] => 1 ) ) [data:protected] => Array ( ) [shipping_methods_option] => flexible_shipping_methods_0 [shipping_method_order_option] => flexible_shipping_method_order_0 [section_name] => flexible_shipping [type] => class )
Wordpress Version 4.9.4
WooCommerce version 3.3.3.Please help me with this
Thanks
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘get_shipping_methods() return empty rate arary’ is closed to new replies.