Answer the question
In order to leave comments, you need to log in
How to add attribute to woocommerce from existing ones?
In the admin, I created an attribute for example Manufacturers and added several values.
When I add in code
$att = array(
'pa_proizvoditel' => Array(
'name' => 'pa_proizvoditel',
'value' => 'test',
'position' => 0,
'is_visible' => 1,
'is_variation' => 0,
'is_taxonomy' => 1),
update_post_meta( $post_id, '_product_attributes', $att);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question