hi
Do you want to add order shipping cost to each item ?
You can use $order->get_shipping_total()
At the begin i want to try to view a simple data.
I use this function in custom field and functions.php of my child theme.
add_filter(‘woe_get_order_product_value_comm_test’, function ($value, $order, $item, $product,$item_meta) {
$sped1=$order->get_shipping_total();
return $sped1;
}, 10, 3);
Nothing to show only colum blank.
I use a Pro version of the plugin.
This is for me the first step for begin a second step and introduce certain calculate.
Sorry for my bad english
I want to extract the same data in ORDER SHIPPING AMOUNT, this field display correct data. But Why i dont extract this data from my code?
Is importan for me to manipulate this data.
Thanks.
Yes.
I just used this method for other value and all works fine excpet for shipping price.
please, attach your settings(.txt file!) as new ticket to https://algolplus.freshdesk.com/
use tab “Tools” to get them
I’ve just solved the problem.
This is the correct code:
add_filter(‘woe_get_order_product_value_comm_test’, function ($value, $order, $item, $product,$item_meta) {
$sped1=$order->get_shipping_total();
return $sped1;
}, 10, 5);
Another Question.
Is possible to import data from another plugin?
Example:
I’ve $vendor_shipping_default_price from another plugin, is possibile to import this data in a column?
Thanks
yes.
If you know which external functions/classes(added by Vendor plugin) you should use.
or you can just read details directly from database using global object $wpdb
thanks, Alex
-
This reply was modified 5 years, 7 months ago by
algol.plus.