@@ 163-165 (lines=3) @@ | ||
160 | $template = ''; |
|
161 | ||
162 | // Look in yourtheme/slug-name.php and yourtheme/woocommerce/slug-name.php. |
|
163 | if ( $name && ! WC_TEMPLATE_DEBUG_MODE ) { |
|
164 | $template = locate_template( array( "{$slug}-{$name}.php", WC()->template_path() . "{$slug}-{$name}.php" ) ); |
|
165 | } |
|
166 | ||
167 | // Get default slug-name.php. |
|
168 | if ( ! $template && $name && file_exists( WC()->plugin_path() . "/templates/{$slug}-{$name}.php" ) ) { |
|
@@ 173-175 (lines=3) @@ | ||
170 | } |
|
171 | ||
172 | // If template file doesn't exist, look in yourtheme/slug.php and yourtheme/woocommerce/slug.php. |
|
173 | if ( ! $template && ! WC_TEMPLATE_DEBUG_MODE ) { |
|
174 | $template = locate_template( array( "{$slug}.php", WC()->template_path() . "{$slug}.php" ) ); |
|
175 | } |
|
176 | ||
177 | // Allow 3rd party plugins to filter template file from their plugin. |
|
178 | $template = apply_filters( 'wc_get_template_part', $template, $slug, $name ); |