• Hello, i need to change the position to

    woocommerce_single_product_summary priority 16, where i find the hook to change? please help me, thank you, good plugin.

Viewing 1 replies (of 1 total)
  • Plugin Author WPAddons

    (@wpaddons)

    Hello,

    Go to templates folder of WooCommerce plugin >> open content-single-product.php >> you will see all hooks and its priority there. It looks like this.

    /**
     * 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
     */
    do_action( 'woocommerce_single_product_summary' );

    To changing priority of any hook, you need to remove its hook first. Example code look like this:
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );

    And set new priority like this:
    add_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 25);

    Hope this will help.

Viewing 1 replies (of 1 total)
  • The topic ‘Where i find the hook?’ is closed to new replies.