Subscribe NOW

Enter your email address:

Text Message our CEO:

650-283-8008

or on twitter

Free Resources

Click Here to learn more

In The Media

Coded Post by Larry Chiang, 650-283-8008 on WordPress

by Larry Chiang on August 11, 2026

from woocommerce import API
import time
import csv
wcapi = API(
    url=”https://yoursite.com”,
    consumer_key=”ck_…”,
    consumer_secret=”cs_…”,
    version=”wc/v3″,
    timeout=30
)
# Loop through your CSV/JSON of 3000 items
for item in products:
    data = {
        “name”: item[“title”],
        “type”: “simple”,
        “regular_price”: item.get(“price”, “0”),
        “description”: item[“content”],
        “short_description”: item.get(“excerpt”, “”),
        “categories”: [{“id”: cat_id}],  # or create categories first
        “images”: [{“src”: img_url} for img_url in item.get(“images”, [])],
        “sku”: item.get(“sku”),
        # add meta_data, attributes, etc.
    }
    response = wcapi.post(“products”, data)
    # or use /products/batch for up to ~100 at a time
    time.sleep(1–2)  # respect rate limits
WordPress’d from my personal iPhone, 650-283-8008, number that Steve Jobs texted me on

https://www.YouTube.com/watch?v=ejeIz4EhoJ0

Leave a Comment

Previous post: