|
@@ 138-140 (lines=3) @@
|
| 135 |
|
$template = ''; |
| 136 |
|
|
| 137 |
|
// Look in yourtheme/slug-name.php and yourtheme/woocommerce/slug-name.php |
| 138 |
|
if ( $name && ! WC_TEMPLATE_DEBUG_MODE ) { |
| 139 |
|
$template = locate_template( array( "{$slug}-{$name}.php", WC()->template_path() . "{$slug}-{$name}.php" ) ); |
| 140 |
|
} |
| 141 |
|
|
| 142 |
|
// Get default slug-name.php |
| 143 |
|
if ( ! $template && $name && file_exists( WC()->plugin_path() . "/templates/{$slug}-{$name}.php" ) ) { |
|
@@ 148-150 (lines=3) @@
|
| 145 |
|
} |
| 146 |
|
|
| 147 |
|
// If template file doesn't exist, look in yourtheme/slug.php and yourtheme/woocommerce/slug.php |
| 148 |
|
if ( ! $template && ! WC_TEMPLATE_DEBUG_MODE ) { |
| 149 |
|
$template = locate_template( array( "{$slug}.php", WC()->template_path() . "{$slug}.php" ) ); |
| 150 |
|
} |
| 151 |
|
|
| 152 |
|
// Allow 3rd party plugins to filter template file from their plugin. |
| 153 |
|
$template = apply_filters( 'wc_get_template_part', $template, $slug, $name ); |