Forums
Forums / Plugin: Advanced Order Export For WooCommerce / Payment method
(@egyufo)
5 years, 6 months ago
Hello!
Can you help me with a custom code?
I need this if it possible:
if PAYMENT METHOD is COD -> then -> “Utanvet” row = Order Total Amount.
And if PAYMENT METHOD is not COD -> then -> “Utanvet” row = Empty
Thanks!
(@algolplus)
Hi , you can add “Order Total” to export and use this code
add_filter('woe_get_order_value_order_total', function ($value, $order, $fieldname) { if( $order->get_payment_method() != "cod") $value = 0; return $value; }, 10, 3);
The topic ‘Payment method’ is closed to new replies.