Updating Woocommerce Variation Products Prices Via Zoho CRM
I can update product prices with this flow:
But I can't update variant products. I got a code from Zoho for this, but I couldn't get it to work. It needs to find the product in the CRM from the SKU field and update the variation with the price there.
- void updateVariableProductInWoocommerce(string product_id, string variation_id, string regular_price, string sale_price, string stock_quantity)
- {
- url = "<Your Base URL>/wp-json/wc/v3/products/" + product_id + "/variations/" + variation_id;
- params = Map();
- params.put("regular_price",regular_price);
- params.put("sale_price",sale_price);
- params.put("stock_quantity",stock_quantity);
- response = invokeurl
- [
- url :url
- type :PUT
- parameters:params.toString()
- connection:"<Connection Link Name of Woocommerce>"
- content-type:"application/json"
- ];
- info response;
- }
Access your files securely from anywhere
Zoho Developer Community
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.