Title: Hooks and development documentation
Last modified: September 15, 2020

---

# Hooks and development documentation

 *  Resolved [codecoruan](https://wordpress.org/support/users/codecoruan/)
 * (@codecoruan)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/hooks-and-development-documentation/)
 * 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](https://wordpress.org/support/users/dangoodman/)
 * (@dangoodman)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/hooks-and-development-documentation/#post-13414736)
 * 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/](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](https://wordpress.org/support/users/codecoruan/)
 * (@codecoruan)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/hooks-and-development-documentation/#post-13417088)
 * 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](https://wordpress.org/support/users/dangoodman/)
 * (@dangoodman)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/hooks-and-development-documentation/#post-13420077)
 * 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.

 * ![](https://ps.w.org/weight-based-shipping-for-woocommerce/assets/icon-256x256.
   png?rev=2072721)
 * [Weight Based Shipping for WooCommerce](https://wordpress.org/plugins/weight-based-shipping-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/weight-based-shipping-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/weight-based-shipping-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/weight-based-shipping-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/weight-based-shipping-for-woocommerce/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Dan](https://wordpress.org/support/users/dangoodman/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/hooks-and-development-documentation/#post-13420077)
 * Status: resolved