• Resolved Thijs

    (@thijsvereecke)


    Google did not fix my problem so..

    Anyone here know how to increase the character limit for woocommerce product attribute slug, now it has a limit of 28 characters i need max 40.

    I’m testing a local site where product information comes from imported xml files, sometimes certain attribute names are just longer than 28 characters..

    Tried to change the values in wc-attribute-functions.php, and changed 28 to 40, but that didnt help..

    // Validate slug.
    if ( strlen( $slug ) >= 40 ) {
    /* translators: %s: attribute slug */
    return new WP_Error( ‘invalid_product_attribute_slug_too_long’, sprintf( __( ‘Slug “%s” is too long (40 characters max). Shorten it, please.’, ‘woocommerce’ ), $slug ), array( ‘status’ => 400 ) );
    ….

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Product attribute slug is too long (28 characters max).’ is closed to new replies.