How Add complex variation and attributes in woocommerce programmatically
-
Hi i want to add two attributes one is color and the other is size . The values to the size is 2xl,xl,l,md,sm and in color is 1,2,3,4,5 programmatically. I want when i filter size to show all available colors for example if filter in product page 2xl to show 1,2,3 . I have manage to add the attributes size and color but the problem is when i filter for example xm it shows only one color example 1 i cant relate any other. the code is this below
and specific this part of code update_post_meta( $variation_three, ‘attribute_pa_size1’, ‘3’);
[excessive code removed – please use a pastebin]
The topic ‘How Add complex variation and attributes in woocommerce programmatically’ is closed to new replies.