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:
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?
Hi,
Please make changes in file inc/woocommerce.php:
Add next line in function thegem_woocommerce_single_variation_add_to_cart_button():
Like this: