Created
March 4, 2014 21:46
-
-
Save Kevinlearynet/9356456 to your computer and use it in GitHub Desktop.
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
/** | |
* 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