Hi,
it’s something strange, like other plugin may using same hook and rendering ppom meta fields on wrong place.
Hello,
the problem comes up shortly after the upgrade, no new plugin was added. I do not use any other plugin to add input fields to the product pages.
Thank you.
Hello,
I identified the problem. The plugin that causes field duplication is WooCommerce Subscriptions version 2.2.19. On 05/25 they have released a new update, I will carry it out and post the results here.
Thank you!
im getting this bug also is there any solution?
Hi,
Thanks @jpfranco
@axenolcen do you also installed WooCommerce Subscription plugin?
Hello,
the problem was resolved after updating the WooCommerce Subscriptions plugin for the latest version.
Thanks!
Hi there,
I have the same problem, and Idon´t have WooCommerce Subscription plugin. Every plugin is updated, and WordPress core as well.
Hi,
@dinol please share your product page URL.
Hi,
Please update to version 12.6, it will fix this.
Hi nmedia, thanks for the plugin.
The issue you fixed actually created problem for me. I have been using the woocommerce_before_add_to_cart_button
hook to load all type of custom fields into bootstrap modal. I removed below hooks using remove_action
hook
// Rendering fields on product page
add_action ( 'woocommerce_before_add_to_cart_button', 'ppom_woocommerce_show_fields', 15);
add_action ( 'woocommerce_single_variation', 'ppom_woocommerce_show_fields', 15);
Earlier you used only woocommerce_before_add_to_cart_button
hook to render fields but in latest update you used both hooks which is available on the variable.php file into woocommerce template. That’s the main reason of fields duplication. Please remove below hook from plugin.class.php file.
add_action ( 'woocommerce_single_variation', 'ppom_woocommerce_show_fields', 15);
Also remove below code from woocommerce.php file from your plugin
// @Reason: variable product render fields twice. To stop this we add following code.
if( $product->get_type() == 'variable' && current_filter() == 'woocommerce_before_add_to_cart_button') {
return;
}
At the moment, I have been commenting above code due to problem in my case. Removing woocommerce_single_variation
hook with above code will fix the problem for all users not just me.
Hi,
this solution is working fine for all sites now. We cannot change it.
Hi
@vikas_khunteta see this, i hope it helps you:
Remove duplicate fields on product page using PPOM
-
This reply was modified 6 years, 7 months ago by
N-Media.