Home Forums Plugins WooCommerce Orders Tracking Change of aliexpress name to cainiao- Info needed

Change of aliexpress name to cainiao- Info needed

  • Author
    Posts
  • #58927

    Kulbhushan Parashar
    Participant

    Hi team,

    I have seen this below code in other topic to include in the child theme functions.php.

    I need to clarify the correct way to use it.

    1) I need to make aliexpress standard shipping as default is 1st criteria.

    2) further while importing the tracking number from csv, i have to write which slug in the carrier slug column? as code is using aliexpress-standard-shipping in if condition, seems like we have to use slug name = aliexpress-standard-shipping ?

    3) From trackingmore it will automatically fetch data from cainiao site or it will ask user to select the shipping service ?

    Requirement is User will see Cainiao as their shipping tracking partner in the emails as well as whenever the fetch details it will show them directly without any further selection.
    Bit confused, so please help.

    add_filter( ‘woo_orders_tracking_defined_shipping_carriers’, function ( $carriers ) {
    foreach ( $carriers as $carrier_k => $carrier_v ) {
    if ( $carrier_v[‘slug’] === ‘aliexpress-standard-shipping’ ) {
    $carriers[ $carrier_k ][‘name’] = ‘Cainiao’;
    break;
    }
    }

    return $carriers;
    } );

You must be logged in to see replies to this topic. Click here to login or register