• When activating the Tagline option ‘Display on product page’, the tagline is displayed between price and another custom price value. It is not displayed just before the ‘Add to Cart’ button, as I expected.

    Please increase the priority to a value just below 20 (woocommerce_template_single_excerpt) for the ‘render_tagline’ function, to prevent potential conflicts.

    See: line 174: /zipmoney-payments-woocommerce/includes/class-wc-zipmoney-payment-gateway-widget.php

    Referenced from: woocommerce/templates/content-single-page.php

    /**
     * Hook: Woocommerce_single_product_summary.
     *
     * @hooked woocommerce_template_single_title - 5
     * @hooked woocommerce_template_single_rating - 10
     * @hooked woocommerce_template_single_price - 10
     * @hooked woocommerce_template_single_excerpt - 20
     * @hooked woocommerce_template_single_add_to_cart - 30
     * @hooked woocommerce_template_single_meta - 40
     * @hooked woocommerce_template_single_sharing - 50
     * @hooked WC_Structured_Data::generate_product_data() - 60
     */
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Zip Co Limited

    (@zipmoney)

    Hi,

    Thanks for the feedback, we will work on it and we will update the plugin ASAP.

    Thread Starter Damian_AU

    (@damian_au)

    @zipmoney,

    Thanks for the reply. Unfortunately this has not been changed, even after 6 iterations from the version use that I reported on. I have to keep changing the code after updating the plugin. This is NOT ideal.

    This is such an easy thing to change – simply add a priority value to the add_action() function hook. Please.

    File: /zipmoney-payments-woocommerce/includes/class-wc-zipmoney-payment-gateway-widget.php

    In the _add_tagline_hook() function:

    Change:

    if($WC_Zipmoney_Payment_Gateway_Config->get_bool_config_by_key(WC_Zipmoney_Payment_Gateway_Config::CONFIG_DISPLAY_TAGLINE_PRODUCT_PAGE)){
                add_action('woocommerce_single_product_summary', array($this, 'render_tagline'));
    }

    To something like:

    if($WC_Zipmoney_Payment_Gateway_Config->get_bool_config_by_key(WC_Zipmoney_Payment_Gateway_Config::CONFIG_DISPLAY_TAGLINE_PRODUCT_PAGE)){
                add_action('woocommerce_single_product_summary', array($this, 'render_tagline'), 28);
    }

    Where the ‘priority’ is just below the woocommerce_template_single_add_to_cart hook. This will place the Tagline just above the Add to Cart button.

    • This reply was modified 6 years, 5 months ago by Damian_AU.
    • This reply was modified 6 years, 5 months ago by Damian_AU.
    • This reply was modified 6 years, 5 months ago by Damian_AU.
    Plugin Author Zip Co Limited

    (@zipmoney)

    Hi @damian_au,

    Apologies for the belated response here

    The way our assets currently are positioned are for the Tagline to appear under the price and the Widget to appear under the add to cart button.

    This decision has been made by our product and marketing teams, however you mention that this is causing an issue on your site?

    Are you able to provide me the URL where the issue was being experienced so I can forward this to our Product team highlight this issue?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Please increase Tagline hook priortiy’ is closed to new replies.