Created
July 1, 2013 21:06
-
-
Save haroldparis/5904640 to your computer and use it in GitHub Desktop.
WooCommerce : Adding Digg Digg (works best with Normal Display) to woocommerce_share() 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 | |
// Adding Digg Digg (works best with Normal Display) to woocommerce_share() | |
function adding_dd_to_woo() { | |
// first, let's remove Digg Digg from its normal hook | |
remove_filter('the_excerpt', 'dd_hook_wp_content'); | |
remove_filter('the_content', 'dd_hook_wp_content'); | |
// and execute it where we want | |
echo dd_hook_wp_content(); | |
} | |
// and we want it linked to the woocommerce_share() action. | |
add_action( 'woocommerce_share', 'adding_dd_to_woo' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment