Putting aside whether you’re making the API request from and to the same site or not, I assume that the $woocommerce is an instance of Automattic\WooCommerce\Client.
And you can use the batch endpoint for product tags (/wp-json/wc/v3/products/tags/batch) to create/update/delete multiple (by default, up to 100) product tags at a time. Here’s an example for creating multiple product tags:
$data = [
'create' => [
[
'name' => 'Round toe',
],
[
'name' => 'Flat',
],
],
];
print_r( $woocommerce->post( 'products/tags/batch', $data ) );
Related Posts:
- WooCommerce: Can’t use wc_get_products for custom REST API endpoints
- Process checkout using WC REST API
- How to build a plugin that supports authenticated POST requests to the REST API from external servers?
- Extend Woocommerce rest api routes fails
- How to filter Post using Meta Data REST API
- How to stop a Gutenberg Block from firing multiple GET Requests?
- Output JSON object with woocommerce products
- Problem with cURL and rest API
- Woo API REST : product variation price is read-only?
- Category Tree In WooCommerce Product API
- How to upload Woocommerce product images via API? [closed]
- How to handle Woocommerce API credentials
- What will make Woocommerce REST API to issue 401 [closed]
- Woocommerce custom endpoints
- Woocommerce REST API – updating an order changes custom tax calculations
- Woocommerce Rest Api Categories problem [closed]
- API returns blank response after installing & uninstalling WP-rest-api plugin
- woocommerce axios react
- Get specific values in Woocommerce Rest API
- wc_get_products() not return the images details
- WooCommerce – Add product with image via REST API
- Tax are not showing on order while placing order with REST API
- JWT on Woocommerce cannot work with “Customer” role user
- Woocommerce REST API – add filter to set maximum query per page for product brands [closed]
- Using the WordPress and WooCommerce REST APIs in the same Node app
- Retrieve Data from Custom Endpoint
- How to solve `Error getting remote image` in woocommerce rest api script?
- Getting in an exception for get product detail by id in woocommerce REST api
- Impossible to create a new WooCommerce customer using Rest API
- Woocommerce API security concerns
- How can I send information when a order is completed to my own POS?
- Woocommerce Rest API: woocommerce_product_invalid_image_id
- WC Booking query bookings with date ranges
- “error_message”: “Sorry, you cannot list resources.” using WooCommerce API
- Woocommerce REST API: creating variations
- Woocommerce REST API not considering discounts and coupons
- WooCommerce REST API endpoints don’t exist
- Fetch products with filter by similar categories at same time
- Send data to external websites when there is an update or create a post
- Auto generating API keys using the Application Authentication Endpoint [closed]
- GET woocommerce order request is not showing meta data [closed]
- How to add fee_lines using woocommerce rest API v3?
- Update a server-side render Block when woocommerce cart block changed
- Woocommerce is_shop not on page slug? [closed]
- WooCommerce – Trigger Checkout Form Validation
- Debugging why featured images have stopped showing in WooCommerce on the homepage [closed]
- WooCommerce minimum order amount for specific country excluding local pickup [closed]
- woocommerce list product by id
- Woocommerce Login Redirect to old domain
- Woocommerce – auto logout after payment
- Display SKU for each Single product title in group product!
- How can I add a so i can show sale price under normal price
- WooCommerce checkout page price break down table hook
- Hide shipping method in woocommerce if custom checkbox field is selected
- how to change add to cart button to call for price button in one of product variation?
- Next/Previous Product with custom order by price & products inside the product category [closed]
- Submitting product attributes via Ninja Forms wordpress?
- Migrating WordPress + WooCommerce from server to Local
- wp-cron and woocommerce subscriptions killing performance
- How to Add “parent category description” in Woocommerce sub category page if there is no description available for child category
- Woocommerce – Hide shipping at all, if only certain product or products with certain shipping class is in the cart
- Woocommerce Variation product added twice to cart
- Woocommerce product query not working in other WPML languages
- Woocommerce get attributes
- Add custom field address_3 before city in user profile
- How to upload very large JPGs to Media Library for WooCommerce digital download prints
- use vendor address instead of store main address for shipping and taxes calculation
- WooCommerce REST API AJAX Auth – 401 response
- Looping through and combining calls to Woocommerce REST API
- Get $order in wp_head
- Update WooCommerce stock status with SQL query if stock value is greater than 0
- How to find which last line executed in wordpress?
- Adding order details in woocommerce all booking dashboard
- woocommerce cart related issue cart not deleted
- WooCommerce – Hide price and add to cart button
- Send a different “thank you” email based on payment method
- Delete product image using WooCommerce API?
- Empty Cart on just mobile and Microsoft edge browser
- How to add a special Woocommerce “Buy Now” button?
- WP All import sale price 0 [closed]
- WooCommerce database upgrade behaviour
- Integration widget Mondial Relay Js
- creating number of database entries based on users numerical input
- Import download attachment from woocommerce product
- Custom Registration Fields woocommerce
- Duplicate post/product permalinks. (Link is temporary)
- Add an extra column to /my-account/subscriptions/ WooCommerce page
- Understanding WooCommerce Build-In Geolocation/ Geo_IP classes
- WooCommerce set specific currency on site shop
- WooCommerce shop, my account, cart every page redirect to home page [closed]
- How to edit woocommerce checkout fields
- Restrict the shop_manager role to the WooCommerce Orders Page
- How to disable click thumbnail product on archives product [closed]
- Unable to get product category
- Why does have_comments return false but get_comments return array of commemts?
- Update WooCommerce Short Description using SQL
- How do I fix this “Uncaught ReferenceError: woodmartThemeModule is not defined”?
- How can I solve WordPress error “Cannot load product_attributes” and “Cannot load product-reviews”?
- WP All Import – Set product product status with xpath
- how to refrence woocommerce blocks in code?