Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Also after digging I do see a possible replacement – Default Attributes for WooCommerce

    Also after digging I do see a possible replacement – Default Attributes for WooCommerce

    This plugin is abandoned. Use the previous version if you are able. It was working for me.

    It really isn’t. If you roll back to the previous version you might have better luck. I did. It still works for me.

    Thread Starter rumblewand

    (@rumblewand)

    So far I have gotten to this point. I think the hook I am using may need to be the corrected or perhaps I need to load the Elex Class??? Not sure. My limited PHP knowledge comes from trial and error. Anyway – this is my current snippet

    add_action( ‘woocommerce_checkout_update_order_meta’, ‘add_tracking_information_into_order’, 10, 2 );
    $myship_func = get_post_meta($order_id, ‘wf_easypost_labels’);
    function add_tracking_information_into_order($order, $myship_func){
    $order_id = $order->get_id();
    $args = array(
    ‘tracking_provider’ => $myship_func[‘carrier’],
    ‘tracking_number’ => wc_clean($myship_func[‘tracking code’]),
    ‘date_shipped’ => wc_clean($myship_func[‘order_date’]),
    ‘status_shipped’ => 1,
    );
    $ast = new WC_Advanced_Shipment_Tracking_Actions;
    $tracking_item = $ast->insert_tracking_item( $order_id, $args );
    }

    Thread Starter rumblewand

    (@rumblewand)

    Yeah – we started with the snippet

    <?php
    add_action( ‘woocommerce_shipstation_shipnotify’, ‘add_tracking_information_into_order’, 10, 2 );
    function add_tracking_information_into_order($order, $tracking_details){
    $order_id = $order->get_id();
    $args = array(
    ‘tracking_provider’ => $tracking_details[‘carrier’],
    ‘tracking_number’ => wc_clean( $tracking_details[‘tracking_number’] ),
    ‘date_shipped’ => wc_clean( $tracking_details[‘ship_date’] ),
    ‘status_shipped’ => 1,
    );
    $ast = new WC_Advanced_Shipment_Tracking_Actions;
    $tracking_item = $ast->insert_tracking_item( $order_id, $args );
    }

    and asked Elex for the hooks. I get that the Elex array contains this info. I’m just not sure it works normally as it is contained in a class. A developer could do it yes but then I won’t be able to learn for the future. This is currently what I have:

    <?php
    add_action( ‘woocommerce_shipstation_shipnotify’, ‘add_tracking_information_into_order’, 10, 2 );
    function add_tracking_information_into_order($order, ‘wf_easypost_labels’){
    $order_id = $order->get_id();
    $args = array(
    ‘tracking_provider’ => ‘wf_easypost_labels’[’carrier’],
    ‘tracking_number’ => wc_clean( ‘wf_easypost_labels’[’tracking code’] ),
    ‘date_shipped’ => wc_clean( ‘wf_easypost_labels’[’order_date’] ),
    ‘status_shipped’ => 1,
    );
    $ast = new WC_Advanced_Shipment_Tracking_Actions;
    $tracking_item = $ast->insert_tracking_item( $order_id, $args );
    }

    I will report back findings.

    Thread Starter rumblewand

    (@rumblewand)

    I did that originally and posted the code they provided above but I don’t get how to use class hooks (if that’s what it is called). Normal hooks I understand but that array makes zero sense to me ??

    Thread Starter rumblewand

    (@rumblewand)

    We attempted several iterations to get this working with the published snippet for pulling tracking data from external plugins posted on the AST website with no luck. Would you recommend we try shipstation instead? I know that aftership works with shipstation but we like your tracking service better with twilio.

    Double data entry for every order won’t work though so any input appreciated.

    rumblewand

    (@rumblewand)

    Not sure why no one has chimed in on this. It seems to work with Monster Insights for basic analytics just fine. I am using enhanced ecommerce as well and those scripts are still showing in GTMetrix. I do not think it stores the ec.js and linkid.js files yet. Hopefully in the future ??

Viewing 9 replies - 1 through 9 (of 9 total)