Forums
Home / Plugin: Advanced Order Export For WooCommerce / Payment method
(@egyufo)
4 years, 2 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);