Hi Florian
I am using this code in a custom created file and this file has only a single function. How do I use $this->woocommerce in my custom function?
please help.
$variation_data = [
'regular_price' => '15.00',
'image' => [
'src' => 'https://shop.local/path/to/image_size_l.jpg',
],
'attributes' => [
[
'id' => 5,
'option' => 'L',
],
],
];
$this->woocommerce->post( "products/$product->id/variations", $variation_data );