Open dtezcan opened 8 years ago
Hi there! Had the same problem and found the solution. You need to create a API catch handler in your child theme's functions.php. Some saint made this already. Save the class in your child theme folder and include the php class in your functions.php file. The class is here: https://github.com/judgej/wc-api-custom-meta
You then can send them in the same array query from this api client by using syntax below:.
'custom_meta' => array(
'_custom_field_A' => 'valuea',
'_custom_field_B' => 'valueb')
Hi,
I'm trying to update a product with a custom field. Is it possible to do that with this program? and if so how?
current code: `$data = array( 'product' => (object) array( 'managing_stock' => true, 'in_stock' => $inStock, 'stock_quantity' => $aantal, 'regular_price' => (string) $itemresult[$i]->prijs ) );
$woocommerce->products->update($variationid, $data);`
Thanks :)