Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions includes/class-wc-pos-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ static public function locate_default_template_files( $partials_dir = '' ) {
static public function locate_template_files( $partials_dir = '' ) {
$files = array();
foreach ( self::locate_default_template_files( $partials_dir ) as $slug => $path ) {
$files[ $slug ] = self::locate_template_file( $path );
$files[ $slug ] = self::locate_template_file( $path, $partials_dir );
};

return $files;
Expand All @@ -348,8 +348,8 @@ static public function locate_template_files( $partials_dir = '' ) {
* @param string $default_path
* @return string
*/
static public function locate_template_file( $default_path = '' ) {
$custom_path1 = str_replace( self::get_template_dir(), 'woocommerce-pos', $default_path );
static public function locate_template_file( $default_path = '', $partials_dir = '' ) {
$custom_path1 = str_replace( $partials_dir ?: self::get_template_dir(), 'woocommerce-pos', $default_path );
$custom_path2 = str_replace( 'tmpl-', '', $custom_path1 );
$custom = locate_template( array( $custom_path1, $custom_path2 ) );

Expand Down