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:
parent
2462877c56
commit
54db5f07c4
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue