Created
February 22, 2017 14:17
-
-
Save EricBusch/b65a5cc68430d03a3e9b4a0d0c204e3a to your computer and use it in GitHub Desktop.
This code removes a Datafeedr Comparison Set from appearing below the product's details on the WooCommerce product page and adds it immediately below the product's title on single product pages.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove Comparison Sets from WooCommerce Product pages. | |
* | |
* @see remove_action(), dfrcs_wc_compset_priority() | |
*/ | |
add_action( 'wp_head', 'mycode_remove_compset_from_woocommerce_product_pages' ); | |
function mycode_remove_compset_from_woocommerce_product_pages() { | |
remove_action( 'woocommerce_after_single_product_summary', 'dfrcs_wc_single_product_page_compset', 0 ); | |
} | |
/** | |
* Insert Comparison Set immediately below the product title on WooCommerce Product pages. | |
*/ | |
add_action( 'woocommerce_single_product_summary', 'dfrcs_wc_single_product_page_compset', 6 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment