Advertisement
5ally

woocommerce_after_single_product_summary

Feb 12th, 2019
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1. <?php
  2. /** WooCommerce registered the hooks like so:
  3. add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
  4. add_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
  5.  
  6. // Copy the code below and ignore this comment.
  7. */
  8.  
  9. // So in order to sort/re-order the hooks, first, remove the default hooks.
  10. remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
  11. remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
  12.  
  13. // Then add them back - look at the priority values; they are now switched.
  14. add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 15 ); // priority = 15
  15. add_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 10 );           // priority = 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement