Merge pull request #17226 from Umangvaghela/fix-minor-changes
Fix minor changes
This commit is contained in:
commit
7eedf1c513
|
@ -235,12 +235,12 @@ class WC_Admin_Notices {
|
|||
$theme_file = false;
|
||||
if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {
|
||||
$theme_file = get_stylesheet_directory() . '/' . $file;
|
||||
} elseif ( file_exists( get_stylesheet_directory() . '/woocommerce/' . $file ) ) {
|
||||
$theme_file = get_stylesheet_directory() . '/woocommerce/' . $file;
|
||||
} elseif ( file_exists( get_stylesheet_directory() . '/' . WC()->template_path() . $file ) ) {
|
||||
$theme_file = get_stylesheet_directory() . '/' . WC()->template_path() . $file;
|
||||
} elseif ( file_exists( get_template_directory() . '/' . $file ) ) {
|
||||
$theme_file = get_template_directory() . '/' . $file;
|
||||
} elseif ( file_exists( get_template_directory() . '/woocommerce/' . $file ) ) {
|
||||
$theme_file = get_template_directory() . '/woocommerce/' . $file;
|
||||
} elseif ( file_exists( get_template_directory() . '/' . WC()->template_path() . $file ) ) {
|
||||
$theme_file = get_template_directory() . '/' . WC()->template_path() . $file;
|
||||
}
|
||||
|
||||
if ( false !== $theme_file ) {
|
||||
|
|
|
@ -371,12 +371,12 @@ class WC_Tracker {
|
|||
foreach ( $files as $file ) {
|
||||
if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {
|
||||
$theme_file = get_stylesheet_directory() . '/' . $file;
|
||||
} elseif ( file_exists( get_stylesheet_directory() . '/woocommerce/' . $file ) ) {
|
||||
$theme_file = get_stylesheet_directory() . '/woocommerce/' . $file;
|
||||
} elseif ( file_exists( get_stylesheet_directory() . '/' . WC()->template_path() . $file ) ) {
|
||||
$theme_file = get_stylesheet_directory() . '/' . WC()->template_path() . $file;
|
||||
} elseif ( file_exists( get_template_directory() . '/' . $file ) ) {
|
||||
$theme_file = get_template_directory() . '/' . $file;
|
||||
} elseif ( file_exists( get_template_directory() . '/woocommerce/' . $file ) ) {
|
||||
$theme_file = get_template_directory() . '/woocommerce/' . $file;
|
||||
} elseif ( file_exists( get_template_directory() . '/' . WC()->template_path() . $file ) ) {
|
||||
$theme_file = get_template_directory() . '/' . WC()->template_path() . $file;
|
||||
} else {
|
||||
$theme_file = false;
|
||||
}
|
||||
|
|
|
@ -661,7 +661,7 @@ class WC_Email extends WC_Settings_API {
|
|||
protected function save_template( $template_code, $template_path ) {
|
||||
if ( current_user_can( 'edit_themes' ) && ! empty( $template_code ) && ! empty( $template_path ) ) {
|
||||
$saved = false;
|
||||
$file = get_stylesheet_directory() . '/woocommerce/' . $template_path;
|
||||
$file = get_stylesheet_directory() . '/' . WC()->template_path() . $template_path;
|
||||
$code = wp_unslash( $template_code );
|
||||
|
||||
if ( is_writeable( $file ) ) {
|
||||
|
|
Loading…
Reference in New Issue