get template part fix for loop-shop
This commit is contained in:
parent
706d15db2d
commit
871271ffe9
|
@ -104,13 +104,14 @@ if (!function_exists('is_ajax')) {
|
|||
*/
|
||||
function woocommerce_get_template_part( $slug, $name = '' ) {
|
||||
global $woocommerce;
|
||||
if ($name=='shop') :
|
||||
if (!locate_template(array( 'loop-shop.php', $woocommerce->template_url . 'loop-shop.php' ))) :
|
||||
if ($name=='shop' && !locate_template(array( 'loop-shop.php', $woocommerce->template_url . 'loop-shop.php' ))) {
|
||||
load_template( $woocommerce->plugin_path() . '/templates/loop-shop.php',false );
|
||||
return;
|
||||
endif;
|
||||
endif;
|
||||
} elseif ($name=='shop' && locate_template(array( $woocommerce->template_url . 'loop-shop.php' ))) {
|
||||
get_template_part( $woocommerce->template_url . $slug, $name );
|
||||
return;
|
||||
}
|
||||
get_template_part( $slug, $name );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue