• Resolved webreturn10

    (@webreturn10)


    Dear developers of WooCommerce,

    Hook ‘woocommerce_order_status_completed’ is not triggered when order status is set to ‘completed’ through the WooCommerce API.

    This is important for services like SendCloud, which also do not trigger it.

    They did not want to cooperate when I asked them if they could trigger the hook when they set the status to ‘completed’ through their external system.

    So here I am asking for you developers to make sure this hook is triggered, so that the product review invitation emails which are tied to that hook are enqueued if the order status is set to ‘completed’ by SendCloud.

    Kind regards,
    Thijs Terluin

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello webreturn10

    Thank you for contacting WooCommerce support.

    As you mentioned, the most effective way for this issue is to be looked into by the SendCloud team. This problem has happened before and the SendCloud team had the same response as you have received.

    So as an alternate solution, we suggested?ShipStation for WooCommerce?extension. This extension offers similar features.

    Check out?our documentation on how one might troubleshoot such issues. (I understand ShipStation is a different application; I am only noting our documentation so you can check generally how this type of issue is handled.)

    I hope this is helpful.
    Feel free to reply if you have more questions. ??

    Best regards,
    Z.Z

    Thread Starter webreturn10

    (@webreturn10)

    Hello Zubair,

    Thank you for your response.

    I could offer the alternative extension to my client, but shouldn’t it be WooCommerce’s responsibility to trigger the hook if the status of an order changes to ‘completed’ if done through the WooCommerce API?

    I understand that it might be technically difficult since the hook is to be activated through the WordPress backend, but I think this should be possible. Perhaps enable it as an optional argument for the API call.

    Just out of curiosity, does the ShipStation plug-in fire the hook when automatically setting the order status to ‘completed’?

    Kind regards,
    Thijs Terluin

    ?? hey @webreturn10

    Thank you for reaching back, clarifying things further.

    Let’s loop back to this inquiry:

    Hook ‘woocommerce_order_status_completed’ is not triggered when order status is set to ‘completed’ through the WooCommerce API.

    As I understand, there is custom code, connecting to said site via the WooCommerce API. It appears that when an order’s status is set to Completed via this custom code, the woocommerce_order_status_completed hook is not triggered. Am I getting this?

    make sure this hook is triggered, so that the product review invitation emails which are tied to that hook are enqueued if the order status is set to ‘completed’ by SendCloud.

    Moreover, it sounds like the goal here is to send email invitation for reviews, upon an order’s status change to Completed.

    As an alternative, feel free to check out AutomateWoo – a marketing automation plugin which integrates directly with your WooCommerce store.

    Creating triggers and workflows are powerful advantages of AutomateWoo. Linked here is a guide to Creating automated WooCommerce review reminders & rewards — a perfect fit for your site’s needs. Moreover, its main documentation page can be found linked here, for your convenience, with plenty more information to browse.

    Keep in mind, if you want to try our products, you can leverage our 30-day refund policy. In a nutshell, it gives you 30 days to try it out, and if the product doesn’t work the way you need or you think another product would work better, we are more than happy to offer a full refund. You’ll find the details of our refund policy here.

    I hope this is helpful! We look forward to your response. In the meantime, please let us know if you have any further questions or concerns.

    • This reply was modified 11 months, 2 weeks ago by anastas10s. Reason: typo
    Thread Starter webreturn10

    (@webreturn10)

    Hey Pepe,

    Thank you for your message.

    As I understand, there is custom code, connecting to said site via the WooCommerce API. It appears that when an order’s status is set to?Completed?via this custom code, the?woocommerce_order_status_completed?hook is not triggered. Am I getting this?

    Correct. SendCloud is a third-party that uses the WooCommerce API, but they do not trigger the hook and they are not willing to do so.

    Does AutomateWoo rely on hook woocommerce_order_status_completed when it comes to the order status change trigger listed here?

    If so, then I don’t think AutomateWoo would help, because the core problem is that the hook is not fired when the order status is changed through the WooCommerce API; the review invitation plugin that we use works fine, SendCloud is also fine apart from them not willing to cooperate.

    I would like to get to a solution with the developers of WooCommerce instead of switching plug-ins, since I think it would be better if this is possible through WooCommerce’s API instead of creating workarounds.

    If you are not willing to update the WooCommerce API to allow for triggering the hook, then let me know; I will instead set up a cronjob to check the status of every order and enqueue the review invitations myself.

    Kind regards,
    Thijs Terluin

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @webreturn10

    Does AutomateWoo rely on hook woocommerce_order_status_completed when it comes to the order status change trigger listed here?

    You’re correct in understanding that AutomateWoo relies on the woocommerce_order_status_completed hook for triggering the order status change. However, as you’ve pointed out, the core issue lies in the hook not being triggered when the order status is changed through the WooCommerce API.

    If you are not willing to update the WooCommerce API to allow for triggering the hook, then let me know; I will instead set up a cronjob to check the status of every order and enqueue the review invitations myself.

    As of now, the API doesn’t trigger the woocommerce_order_status_completed hook. While we can’t promise an immediate change, it would be great to have you add your ideas as a feature request, which is where developers go to look for future plugin features and improvements.

    You can also submit an enhancement requests in our GitHub repo here.

    However, your idea of setting up a cron job to check the status of every order and enqueue the review invitations seems like a feasible workaround.

    I would like to get to a solution with the developers of WooCommerce instead of switching plug-ins, since I think it would be better if this is possible through WooCommerce’s API instead of creating workarounds.

    For reference, these particular forums are meant for general support with the core functionality of WooCommerce itself. For development and custom coding questions, it’s best to ask for insight related to those on either the WooCommerce Advanced Facebook group or the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:

    I wish I could help more, but hopefully, this gets you going in the right direction to get some further insight/information.

    Thread Starter webreturn10

    (@webreturn10)

    Dear Shameem,

    Thank you for understanding, and for the information!
    I will submit a feature request and in the meantime I will work on the custom solution!

    Kind regards,
    Thijs Terluin

    Hi @webreturn10,

    We’re glad to hear that you’re open to a custom solution while you work on opening a feature request.

    With that said, I’ll go ahead and mark this thread as resolved. Should you have any further questions or concerns, please feel free to reach out.

    All the best!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Activate hook when order status set to ‘completed’ by WooCommerce API’ is closed to new replies.