Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /** WooCommerce registered the hooks like so:
- add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
- add_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
- // Copy the code below and ignore this comment.
- */
- // So in order to sort/re-order the hooks, first, remove the default hooks.
- remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
- remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
- // Then add them back - look at the priority values; they are now switched.
- add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 15 ); // priority = 15
- add_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 10 ); // priority = 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement