Ecommerce Shopify WordPress Discussion

Get products that contain 2 specific tag terms via WooCommerce REST API

I am trying to find a way to use the WooCommerce REST API to get products that contain two tags, I am having no luck while googling. I hope that someone can provide me some insights. I have a query looking for two tag Ids and I need it to match. I have like 5000 products, so I don't really want to dump them then sort and woo only lets you pull 100 at a time, I'm also doing this based on a tag stored as a cookie for a location filter. Here is what I am doing, but it is OR (not AND)… Does anyone know a workaround? function getApiUrlByLocation(storeLocation) { var tagMapping = { 'A-store': 334, 'B-store': 357, 'C-store': 333 }; // Modify the URL to fetch products with either tag 315 and the store-specific tag var apiUrlBase = 'https://www.URL GO HERE /wp-json/wc/v3/products?per_page=100&tag=315'; if (storeLocation !== 'all-stores') { apiUrlBase += ',' + tagMapping[storeLocation]; } return apiUrlBase; }
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.