Hello,
I created a form with a list of the terms after the validation of the form the value do not appear in the product sheet
can someone help me please
[cred_generic_field field="pa_condition" taxonomy="pa_condition" type="select" single_select="true"]
{
"required":0,
"validate_format":0,
"persist":1,
"default":[],
"options":[
{"value":"as-good-as-new","label":"As good as new"},{"value":"good-normal-traces-of-use","label":"Good – Normal traces of use"},{"value":"in-its-own-element","label":"In it’s own element"},{"value":"need-to-be-restored","label":"Need to be restored"},{"value":"new","label":"new"},{"value":"very-good-no-defect-but-may-show-slight-traces-of-use","label":"Very good – no defect but may show slight traces of use"}
]
}
[/cred_generic_field]
Best regards
Momo
I solved:
function update_post_meta_subito($post_id){
$prova_termine='inzaghi';
$term_taxonomy_ids = wp_set_object_terms( $post_id, $prova_termine, 'pa_autore', true );
$thedata = Array(
'pa_autore'=>Array(
'name'=>'pa_autore',
'value'=>$prova_termine,
'is_visible' => '1',
'is_variation' => '1',
'is_taxonomy' => '1'
),
);
update_post_meta( $post_id, '_product_attributes',$thedata);