Hooks Problem
-
Hi,
I want to add a hook in my product page, but as I can see you have change the summary..
I want to add this hook…
add_action(‘woocommerce_single_product_summary’,’my_custom_field’, 20);
and the hook don’t respect my choise.
I found at github that you have remove the hooks to add your summary hook..
// Remove the single product summary content to add the sortable control
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_title’, 5 );
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_rating’, 10 );
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 10 );
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_excerpt’, 20 );
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’, 30 );
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_meta’, 40 );
add_action( ‘woocommerce_single_product_summary’, array( $this, ‘single_product_content’ ), 10 );So now my hook goes above or below your summary…
How can I add my hook?
Thanks
The topic ‘Hooks Problem’ is closed to new replies.
