fbpx
Enjoy Year-End Sale: 50% Off All Plugins! Coupon Code: NewYear2025

Add new term issue

Hi,

i upgraded your variation swatches to the last 1.1.17, and now if I add a new product, i have the “add new” term button, of attribute, disabled. How can i fix it?

Golam Kibria

Hi Giuseppe,

Thanks a lot for sharing the video.

You will have to add attributes globally.

With our plugin, you have different types of attributes (button, color, image, radio).

It becomes difficult for us to track the attribute type if they are added from there.

I hope you have understood the technical problem.

Is there anything else I can do for you?

Thank You

Ok, the issue is just for colors, but i found in /woo-variation-swatches/includes/functions.php line 842

if ( ! empty( $fields ) ): ?>
<button disabled=”disabled” class=”button fr plus wvs_add_new_attribute” data-dialog_title=”<?php printf( esc_html__( ‘Add new %s’, ‘woo-variation-swatches’ ), esc_attr( $attribute_taxonomy->attribute_label ) ) ?>”><?php esc_html_e( ‘Add new’, ‘woo-variation-swatches’ ); ?></button>
<?php else: ?>
<button class=”button fr plus add_new_attribute”><?php esc_html_e( ‘Add new’, ‘woo-variation-swatches’ ); ?></button>
<?php endif; ?>

if i replace the disabled part it works fine…

Golam Kibria

Hi Giuseppe,

I am glad that you have found the code.

Be aware that a color added here will only show a white circle/rectangle.

You need to configure the color to make it visible.

This is why we had to force everyone to add the term globally.

Is there anything else I can do for you?

Thank You