Forked from EricBusch/move_comparison_set_immediately_below_product_title.php
Created
July 25, 2017 12:23
-
-
Save EricBusch/f6c5c828871b75358b487b064b9a5aa9 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