Skip to content

Instantly share code, notes, and snippets.

@haroldparis
Created July 1, 2013 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haroldparis/5904640 to your computer and use it in GitHub Desktop.
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
<?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