• Resolved myacoub

    (@myacoub)


    i want to develop a wooCommerce “Action” to automate adding the tracking number to the tracking field in WooCommerce. I am too lazy to open each order and manually copy and past the tracking number of every order then save it. I hope someone can help me develop a wooCommerce “Action” for this. I mean what Action hook i should use and what could be the Action function in this case. I am using the plugin named “WooCommerce Shipping & Tax” to buy the shipping labels.

    Additionally, i have enabled the tracking number via using a plugin called “Orders Tracking for WooCommerce” (found here –> https://villatheme.com/extensions/woocommerce-orders-tracking/). Not sure if i need to use the wooCommerce plugin called “Shipment Tracking” (found here –> https://woocommerce.com/document/shipment-tracking/#) instead of the current one –> “Orders Tracking for WooCommerce” in order to accomplish the task i mentioned above.

    Any help would be appreciated.

    Mouhab

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hi @myacoub,

    The WooCommerce Shipment Tracking extension can automate this for you. It can automatically capture the tracking numbers and notify customers about them for you.

    https://woocommerce.com/products/shipment-tracking/

    You’re welcome to code up your own solution if you’d rather. The information is stored as a custom field under the key, wc_connect_labels. It’s more information than just the tracking number so you would need to write a function that parses the information and pulls out what you need.

    Let me know if you have any questions.

    Cheers!

    Thread Starter myacoub

    (@myacoub)

    Hi @3sonsdevelopment

    Thank you for your answer. I have visited the link you provided for “WooCommerce Shipment Tracking” extension/plugin, but the docs doesn’t state that the tracking info will be auto populated upon purchasing the shipping label via the “WooCommerce Shipping & Tax” extension/plugin.

    Can you elaborate on how can i make this process a none manual one. I mean I want the tracking number populated automatically without me typing it manually after buying the shipping label via “WooCommerce Shipping & Tax” extension/plugin.

    Plugin Contributor Shaun Kuschel a11n

    (@shaunkuschel)

    Automattic Happiness Engineer

    Hey @myacoub,

    When using the WooCommerce Shipping & Tax plugin to purchase shipping labels, the tracking numbers will be automatically added to the built-in “Shipment Tracking” widget after the purchase, and that tracking info will be sent to the customer once the Order Status is changed to “Completed” (as the tracking info will be included in the default “Order Completed” email in WooCommerce).

    https://woocommerce.com/document/woocommerce-shipping-and-tax/woocommerce-shipping/#tracking-information

    If you have any other questions, let us know!

    Thread Starter myacoub

    (@myacoub)

    Hello @shaunkuschel

    I really thank you for the helping hands here…

    I am not sure where is that built-in “Shipment Tracking” widget. I went to “Email Templates >> All Emails” and then selected my “Completed Order” email template and can’t see that widget on the left side bar!!

    Can you help plz? Just need the Tracking number and tracking url of UPS to be sent to the client once i buy the UPS label and tick the mark to “complete the order”

    Mouhab

    Thread Starter myacoub

    (@myacoub)

    for instance, i can add the order# via the tag {order_number}.. How do i add to the email the tracking URL and tracking number of the label i purchased?

    Mouhab

    Plugin Contributor Shaun Kuschel a11n

    (@shaunkuschel)

    Automattic Happiness Engineer

    Hey @myacoub,

    I am not sure where is that built-in “Shipment Tracking” widget. I went to “Email Templates >> All Emails” and then selected my “Completed Order” email template and can’t see that widget on the left side bar!!

    Sorry for any confusion here. The “Shipment Tracking” widget that I was referring to is actually on the Order admin page (not the email template). To clarify, this is the widget I was referring to before a label is purchased via WooCommerce Shipping:

    https://d.pr/i/Pw3akT

    After the label is purchased, that widget will automatically update to include the tracking info, as seen here:

    https://d.pr/i/hUhgoy

    If the Order Status is updated to “Completed” when that label is purchased, the tracking info will automatically be included in the “Completed Order” email that is sent to the customer. That feature was added via this pull request.

    Though, if you are looking to custom develop something else, I would recommend taking a look at the code in the class-wc-connect-extension-compatibility.php file (link to that file in the public Github repository can be found here).

    If you have any other questions, let us know!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Actions and Action hooks – Help needed’ is closed to new replies.