Skip to content

Instantly share code, notes, and snippets.

@Kevinlearynet
Created March 4, 2014 21:46
Show Gist options
  • Save Kevinlearynet/9356456 to your computer and use it in GitHub Desktop.
Save Kevinlearynet/9356456 to your computer and use it in GitHub Desktop.
/**
* Woo: Custom Download View
*
* Enable custom download box from plugin, if plugin is de-activated
* fallback to woocommerce default.
*/
function rapid_mydownloads( $template, $slug, $name ) {
if ( $template == 'myaccount/my-downloads.php' && function_exists( 'rapid_show_custom_download_box' ) ) {
global $woocommerce;
rapid_show_custom_download_box();
return false;
} else {
return $template;
}
}
add_filter( 'wc_get_template_part', 'rapid_mydownloads', 99, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment