get template part fix for loop-shop

This commit is contained in:
Mike Jolley 2012-02-06 09:42:30 +00:00
parent 706d15db2d
commit 871271ffe9
1 changed files with 8 additions and 7 deletions

View File

@ -104,13 +104,14 @@ if (!function_exists('is_ajax')) {
*/ */
function woocommerce_get_template_part( $slug, $name = '' ) { function woocommerce_get_template_part( $slug, $name = '' ) {
global $woocommerce; global $woocommerce;
if ($name=='shop') : if ($name=='shop' && !locate_template(array( 'loop-shop.php', $woocommerce->template_url . 'loop-shop.php' ))) {
if (!locate_template(array( 'loop-shop.php', $woocommerce->template_url . 'loop-shop.php' ))) : load_template( $woocommerce->plugin_path() . '/templates/loop-shop.php',false );
load_template( $woocommerce->plugin_path() . '/templates/loop-shop.php',false ); return;
return; } elseif ($name=='shop' && locate_template(array( $woocommerce->template_url . 'loop-shop.php' ))) {
endif; get_template_part( $woocommerce->template_url . $slug, $name );
endif; return;
get_template_part( $woocommerce->template_url . $slug, $name ); }
get_template_part( $slug, $name );
} }
/** /**