Skip to content

Instantly share code, notes, and snippets.

@EricBusch
Created January 2, 2018 20:09
Show Gist options
  • Save EricBusch/99ac1a3e04426e612b6f15863e67ecbe to your computer and use it in GitHub Desktop.
Save EricBusch/99ac1a3e04426e612b6f15863e67ecbe to your computer and use it in GitHub Desktop.
Put the Comparison Set immediately below a Product's Name. [datafeedr][dfrcs]
<?php
/**
* Put the Comparison Set immediately below a Product's Name.
*
* The following 2 actions and 1 function will move a Comparison Set from displaying underneath the WooCommerce
* product's short description to below the product's name and above it's price.
*
* @see remove_action(), dfrcs_wc_compset_priority()
*/
function mycode_remove_compset_from_default_position() {
remove_action(
'woocommerce_after_single_product_summary',
'dfrcs_wc_single_product_page_compset',
dfrcs_wc_compset_priority()
);
}
add_action( 'woocommerce_single_product_summary', 'dfrcs_wc_single_product_page_compset', 6 );
add_action( 'wp_head', 'mycode_remove_compset_from_default_position' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment