Home Forums Plugins WooCommerce Orders Tracking Wp lister ebay plugin compatibility

Wp lister ebay plugin compatibility

  • Author
    Posts
  • #68862

    chill pill
    Participant

    Hello, Wp lister ebay plugin developers have provided a custom code for pulling the tracking code values values ffrom third party plugin “YITH WooCommerce Order Tracking plugin”
    wplister_complete_order_data
    This hook allows you to modify the data that will be provided to eBay when marking an eBay order as complete and is especially useful when you need to submit custom tracking information to eBay.

    The sample code below pulls the tracking information from the YITH WooCommerce Order Tracking plugin.

    add_filter( ‘wplister_complete_order_data’, ‘wple_insert_custom_tracking’, 10, 3 );
    function wple_insert_custom_tracking( $data, $order_id ) {
    // if no tracking number is set, pull value from ywot_tracking_code custom field
    if ( empty( $data[‘TrackingNumber’] ) ) {
    $data[‘TrackingNumber’] = get_post_meta( $order_id, ‘ywot_tracking_code’, true );
    }

    // if no shipping date is set, pull value from ywot_pick_up_date custom field
    if ( empty( $data[‘ShippedTime’] ) ) {
    $data[‘ShippedTime’] = get_post_meta( $order_id, ‘ywot_pick_up_date’, true );
    }

    if ( empty( $data[‘TrackingCarrier’] ) ) {
    $yith_courier = get_post_meta( $order_id, ‘ywot_carrier_id’, true );
    if ($yith_courier == ‘ROYAL_MAIL’)
    $data[‘TrackingCarrier’] = ‘Royal Mail’;
    if ($yith_courier == ‘DPD_LOCAL_UK’)
    $data[‘TrackingCarrier’] = ‘interlinkexpress’;
    }

    return $data;
    }

    So in that plugin “ywot_tracking_code” stores the values and can be pulled by that above code.

    I am wondering what is yours compatibility code that need to be inserted in place of “ywot_tracking_code” for pulling the tracking code and inplace of “ywot_pick_up_date” for pulling the date value and in place of “ywot_carrier_id” for pulling the carrier name

    Please have a look and let me know if the wp lister ebay plugin can pull the tracking codes values form your plugin.

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