WordPress Developer Ukraine, Kyiv
WooCommerce Store API: Build a Custom Storefront with React

WooCommerce Store API: Build a Custom Storefront with React

Build a custom WooCommerce storefront with the Store API and React The WooCommerce Store API (/wp-json/wc/store/v1) is the API behind the Cart and Checkout blocks. It is made for the front end: public product data needs no authentication, the cart belongs to the visitor’s session, and it returns prices, images and stock in a form…
WooCommerce Multi-Currency: Custom Exchange Rates and Geo-Pricing

WooCommerce Multi-Currency: Custom Exchange Rates and Geo-Pricing

Several currencies in WooCommerce: what a small plugin can do and where it stops A shop that sells abroad wants prices in the visitor’s currency. WooCommerce has one store currency, and multi-currency plugins do a lot of work behind the scenes: converting prices, rounding them, charging the right currency through the payment gateway, and keeping…
WooCommerce Product Recommendations with Custom Scoring Algorithms

WooCommerce Product Recommendations with Custom Scoring Algorithms

WooCommerce product recommendations with your own scoring WooCommerce upsells and cross-sells are curated by hand: the shop owner links related products one by one. On a store with hundreds of products nobody keeps that up to date. A simple algorithm based on what customers actually bought together, weighted by category, gives a relevant “Customers also…
WooCommerce Product Gallery: Images, Sideloading, and REST API

WooCommerce Product Gallery: Images, Sideloading, and REST API

WooCommerce product images from URLs: sideload, gallery and REST API Product data from a supplier usually comes with image URLs, not files. The WooCommerce REST API can take those URLs and download the images itself, and in PHP the same is done with media_sideload_image() plus set_image_id() and set_gallery_image_ids(). The parts that are easy to get…
Extending the WooCommerce REST API with Custom Routes and Fields

Extending the WooCommerce REST API with Custom Routes and Fields

Extend the WooCommerce REST API: extra fields and custom routes An ERP or a mobile app talks to WooCommerce through /wp-json/wc/v3/. Sooner or later it needs data that WooCommerce does not expose: an internal supplier code on products, a B2B account number on customers, or a resource of the plugin itself. There are two clean…
Building a Custom WooCommerce Product Type from Scratch

Building a Custom WooCommerce Product Type from Scratch

A custom WooCommerce product type WooCommerce ships with simple, variable, grouped and external products. A service with a booking date, a gift card or a license with seats does not fit any of them well, and storing “this simple product is actually a service” in a meta field leads to checks scattered all over the…
Building Composite Products in WooCommerce Without a Plugin

Building Composite Products in WooCommerce Without a Plugin

A simple composite product in WooCommerce without a plugin A composite product lets the customer build one item from components: a gift box with a choice of tea, mug and card, or a computer with a choice of processor and memory. Extensions do this with full stock handling for every component. For a shop with…