Hello,
I’m trying to update to the latest version of Pro and Wc Vendors. And I’m trying to start using country table rate shipping costs.
This is the error I receive on order-receive step. Could you check if the versions I have are compatible and what might cause the problem?
Uncaught Error: Call to a member function get_meta_data() on array in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wc-vendors-pro/admin/class-wcvendors-pro-commission-controller.php:461
this is line 461:
foreach ( $shipping_items as $shipping_item ) {
$shipping_meta_data = $shipping_item->get_meta_data();
when I print out $shipping_item, this is the output:
(
[name] => Kargo Bedeli
[type] => shipping
[item_meta] => Array
(
[method_id] => Array
(
[0] => wcv_pro_vendor_shipping
)
[cost] => Array
(
[0] => 13.00
)
[taxes] => Array
(
[0] => a:0:{}
)
[vendor_costs] => Array
(
[0] => a:3:{s:14:”total_shipping”;s:2:”13″;s:10:”total_cost”;s:3:”299″;s:5:”items”;a:2:{s:32:”c69c3c5d218d74287f0ac72dee3daa28″;a:2:{s:10:”product_id”;s:5:”14969″;s:13:”shipping_cost”;s:1:”8″;}s:32:”8ff033c6667680373dd7c5ca8bf7ff98″;a:2:{s:10:”product_id”;s:5:”13116″;s:13:”shipping_cost”;s:1:”5″;}}}
)
[Ürünler] => Array
(
[0] => Taba hatai tunik × 1, Mavi Hatai × 1
)
)
[item_meta_array] => Array
(
[54033] => stdClass Object
(
[key] => method_id
[value] => wcv_pro_vendor_shipping
)
[54034] => stdClass Object
(
[key] => cost
[value] => 13.00
)
[54035] => stdClass Object
(
[key] => taxes
[value] => a:0:{}
)
[54036] => stdClass Object
(
[key] => vendor_costs
[value] => a:3:{s:14:”total_shipping”;s:2:”13″;s:10:”total_cost”;s:3:”299″;s:5:”items”;a:2:{s:32:”c69c3c5d218d74287f0ac72dee3daa28″;a:2:{s:10:”product_id”;s:5:”14969″;s:13:”shipping_cost”;s:1:”8″;}s:32:”8ff033c6667680373dd7c5ca8bf7ff98″;a:2:{s:10:”product_id”;s:5:”13116″;s:13:”shipping_cost”;s:1:”5″;}}}
)
[54037] => stdClass Object
(
[key] => Ürünler
[value] => Taba hatai tunik × 1, Mavi Hatai × 1
)
)
[method_id] => wcv_pro_vendor_shipping
[cost] => 13.00
[taxes] => a:0:{}
[vendor_costs] => a:3:{s:14:”total_shipping”;s:2:”13″;s:10:”total_cost”;s:3:”299″;s:5:”items”;a:2:{s:32:”c69c3c5d218d74287f0ac72dee3daa28″;a:2:{s:10:”product_id”;s:5:”14969″;s:13:”shipping_cost”;s:1:”8″;}s:32:”8ff033c6667680373dd7c5ca8bf7ff98″;a:2:{s:10:”product_id”;s:5:”13116″;s:13:”shipping_cost”;s:1:”5″;}}}
[Ürünler] => Taba hatai tunik × 1, Mavi Hatai × 1
)