Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #1688300
Using a Plugin
Closed

Comments

  • Manju Arora started the conversation

    Hello, I added the plugin Woocommerce check pincode/zipcode for shipping (https://wordpress.org/plugins/woocommerce-check-pincode-zipcode-for-shipping/) which works fine for a simple product. However, it does not show anything on the product page for a variable product. I used a different theme and it was working even with a variable product.


    Checked further and found out that the plugin is using the following hook:

    add_action( 'woocommerce_before_add_to_cart_button', 'pincode_field');

    For a simple product, the hook is added but for a variable product the hook is not added so not executed. Could you please help?

  • [deleted] replied

    Hi,

    Please make changes in file inc/woocommerce.php:

    Add next line in function thegem_woocommerce_single_variation_add_to_cart_button():

    <?php do_action( 'woocommerce_before_add_to_cart_button' ); ?>

    Like this: