Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Update variable product regular price. Product ID: 34
- $data = [
- 'update' => [
- [
- 'id' => 34,
- 'regular_price' => '555'
- ]
- ]
- ];
- print_r($woocommerce->post('products/batch', $data));
- // Update product variation. Product ID: 34 , product variation ID: 13
- $data = [
- 'update' => [
- [
- 'id' => 13,
- 'regular_price' => '777'
- ]
- ]
- ];
- print_r($woocommerce->post('products/34/variations/batch', $data));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement