Support » Plugin: PPOM for WooCommerce » Duplicate form field after last update

  • Resolved jpfranco

    (@jpfranco)


    Hello
    after the last update the form fields have duplicated in the product pages, at least the checkbox forms, since they are the ones I use.

    I did a clean install of my site today, both in WordPress and in the database, and even then the bug persisted, ie the problem is not on my site.

    Print: https://ibb.co/gB44Vo

    Thank you for your attention and support.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author N-Media

    (@nmedia)

    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?

    Plugin Author N-Media

    (@nmedia)

    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.

    Plugin Author N-Media

    (@nmedia)

    Hi,

    @dinol please share your product page URL.

    Plugin Author N-Media

    (@nmedia)

    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.

    Plugin Author N-Media

    (@nmedia)

    Hi,

    this solution is working fine for all sites now. We cannot change it.

    Plugin Author N-Media

    (@nmedia)

    Hi

    @vikas_khunteta see this, i hope it helps you:

    Remove duplicate fields on product page using PPOM

    • This reply was modified 1 year, 1 month ago by  N-Media.
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Duplicate form field after last update’ is closed to new replies.