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 = '' ) {
|
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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue