Support » Plugin: Advanced Order Export For WooCommerce » Change Name of Shipping method ID

  • Resolved ABHI

    (@abhi9)


    Hello. Great plugin.

    Trying to change the title of shipping method AKA gateway ID.

    Here’s what I am doing currently & nothing’s happening

    // remap shipping method titles to csv orders export
    add_filter('woe_get_order_value_shipping_method', function ($value, $order, $field) {
     if($value == 'instamojo') // exact match
            return 'prepaid';  
     return $value;
    }, 10, 3);
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thanks. I’ve figured out.

    I was using shipping_method instead of payment_method. The following code works:

    // rename payment method title/id
    add_filter('woe_get_order_value_payment_method_title', 'woe_rename_payment_method_title', 10, 3);
    function woe_rename_payment_method_title($value, $order, $fieldname) {
     if($value == 'Cash on delivery')
            return 'cod';
     if($value == 'paypal')
            return 'prepaid'; 
     return $value;
    }
    • This reply was modified 1 year, 6 months ago by  ABHI.
    Plugin Author algol.plus

    (@algolplus)

    I’m sorry for late reply, I travel this week.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change Name of Shipping method ID’ is closed to new replies.