• Resolved alantomkins

    (@alantomkins)


    Hi Support, I thought I’d raised this but I can’t find any record so apologies if this is a repeat but it’s very important.

    On this page https://geckoglazing.co.uk/product/gecko-panes/ we need the PPOM input fields to be above the measurement calculator. You did give us some code a while ago to do this but it looks like an update has overwritten it. The code was:

    Thanks for using PPOM, you need to decrease the hook priority and for this you need to make this change in classes/plugin.class.php
    Set last priority 15 to 1 here:
    add_action ( ‘woocommerce_before_add_to_cart_button’, ‘ppom_woocommerce_show_fields’, 15);

    We have re added this code and the page has not changed. So 2 questions)
    1) Can you send me a fix please?
    2) How do we stop the code being overwritten in the future if this is what happened when the plugin was updated.

    Thanks again for your help with this.

    Best regards, Alan

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Did you try to add the code again? Theme updates override functions and style changes. That is why you should use a child theme and add changes on the child theme. Try adding the code again maybe

    Hi,

    please try this now from version 22.0+

    add_action ( 'woocommerce_before_add_to_cart_button', 'ppom_woocommerce_inputs_template_base', 1);

    Thread Starter alantomkins

    (@alantomkins)

    Sorry I didn’t get an email notification of your response.

    Thanks I’ll check with my developer, I am pretty sure we always use a child theme.

    Alan

    Thread Starter alantomkins

    (@alantomkins)

    Hi Support,

    The child theme is in place on the site. However there does not seem to be a “child plugin” so regardless of the theme it looks like currently the woocommerce-product-addon/classes/plugin.class.php will be overwritten for any plugin updates.

    Is there any way to avoid this? Perhaps a plugin setting of some kind?

    Thanks,

    Alan

    If you aren’t using a child theme then use Code Snippets to add that code. It’s a great plugin to add customized code without having to worry about theme / plugin overrides and a bloated functions.php file.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Changing the location of the PPOM fields in the product page’ is closed to new replies.