Error message not formatted

The error message that is displayed when adding a reserved term for attribute is not formatted. Hence the user sees %s in his error message.
This commit is contained in:
Ibrahim 2015-04-26 11:24:25 +05:30
parent 98b1845b68
commit 7b513ec35c
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ class WC_Admin_Attributes {
if ( strlen( $attribute_name ) >= 28 ) {
return new WP_Error( 'error', sprintf( __( 'Slug "%s" is too long (28 characters max). Shorten it, please.', 'woocommerce' ), sanitize_title( $attribute_name ) ) );
} elseif ( in_array( $attribute_name, $reserved_terms ) ) {
return new WP_Error( 'error', __( 'Slug "%s" is not allowed because it is a reserved term. Change it, please.', 'woocommerce' ), sanitize_title( $attribute_name ) );
return new WP_Error( 'error', sprintf( __( 'Slug "%s" is not allowed because it is a reserved term. Change it, please.', 'woocommerce' ), sanitize_title( $attribute_name ) ) );
}
return true;