Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* 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