• Resolved timbows

    (@timbows)


    I made a plugin that bases shipping on how far the client is. To do this I used an api that checks their address. The Api charges me per call.

    by default Woocommerce will check the price a few times as your entering the shipping address. This results in me being charged a few times for one check. Is there a way to get Woocommerce to only check once all the information is added?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @timbows,

    Unfortunately, WooCommerce does not have this feature built-in. However, you can modify your plugin only to make the API call when the user clicks on a specific button or completes a certain action, like finalizing their shipping address. This would ensure that the API call is made only once, when all the necessary information is entered.

    You can use WooCommerce’s built-in hooks and filters to accomplish this. For example, you can use the woocommerce_after_checkout_validation hook, which triggers after the checkout process is validated.

    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.

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

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Only check shipping once all info is added’ is closed to new replies.