Fix error message in wc_get_template

If the filtered template does not exist the error should report the filtered template, not the original
This commit is contained in:
koko 2020-05-14 17:10:06 +02:00 committed by GitHub
parent 2462877c56
commit 54db5f07c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ function wc_get_template( $template_name, $args = array(), $template_path = '',
if ( $filter_template !== $template ) {
if ( ! file_exists( $filter_template ) ) {
/* translators: %s template */
wc_doing_it_wrong( __FUNCTION__, sprintf( __( '%s does not exist.', 'woocommerce' ), '<code>' . $template . '</code>' ), '2.1' );
wc_doing_it_wrong( __FUNCTION__, sprintf( __( '%s does not exist.', 'woocommerce' ), '<code>' . $filter_template . '</code>' ), '2.1' );
return;
}
$template = $filter_template;