• Resolved codecoruan

    (@codecoruan)


    Good day,

    I would like to find out whether you have a hooks guide for your plugin or some form of documentation to assist. We have a custom plugin that we use to automatically create orders, but there seems to be some issues in the way it gets shipping zones. I am struggling to find the right way to see how your plugin calculates the shipping methods and it would be easier if there was a development or a hooks guide to assist.

    Do you have something like this, or do you have an alternative for me?

    Your help will be much appreciated.

    Thanks in advance
    Ruan

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Dan

    (@dangoodman)

    Hello Ruan,

    WBS is using the WooCommerce Shiping Method API. You can read more about it here: https://docs.woocommerce.com/document/shipping-method-api/.

    It doesn’t define any its own hooks.

    On the client-side, it’s a minified Angular app.

    Thread Starter codecoruan

    (@codecoruan)

    Hi Dan,

    Thanks for the feedback.

    The issue I have is that in the front-end, it calculates the shipping correctly based on the contents of the order and the zip codes. When I create the same order programmatically, it sometimes has the correct shipping rates and sometimes it doesn’t.

    We need it to pick free shipping if a certain condition is met, and the shipping rates we get contain the normal rate plus a free shipping rate if the condition is met, so we loop through, checking if the free shipping rate is available and choose it. However, sometimes, on the same order, the free shipping rate is not present even though all the parameters are the same.

    How can we go about debugging this issue. As I’ve mentioned, it’s difficult to find out exactly how your plugin calculates the rates based on the rules.

    Thanks

    Plugin Author Dan

    (@dangoodman)

    I can’t think of anything better than standard debugging tools for PHP, like Xdebug with some IDE.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hooks and development documentation’ is closed to new replies.