REST API

Bulk Create Posts Using REST API

Not so far time ago I published a similar tutorial for WooCommerce, actually I wasn’t sure that WordPress REST API itself accepts batch requests as well, because of lack of its documentation. But now I have figured it out and would like to share it with you.

In this tutorial we are going to create a bulk action like this one for posts and pages:

Publishing multiple posts at once to the other site using batch requests in WordPress REST API
When we select “Publish to other site” the posts are going to be published to a completely separate WordPress website with the help of REST API. And it is going to be just a single batch request.

Bulk Copy and Update Products between WooCommerce Stores

Just another tutorial by your requests guys.

In this one we are about to create a bulk action like on the screenshot below which allows to sync products between two (or multiple) WooCommerce stores.

WooCommerce Copy Products and Products data from one site to another
If a product has already been published on Store 2, then we just update its product data.

Using REST API to Sync Users Between Remote Sites

In this post we are going to talk about REST API, particularly about how to sync user registrations, profile updates and removals between two remote WordPress websites.

Manage Custom Taxonomy Terms with REST API

In this tutorial I would like to guide you how you can create WordPress REST API requests in order to manage custom taxonomy terms. And also I’d like to show you some interesting examples along the way.

The idea of this article actually came to my mind when I was developing an add-on for my Simple WordPress Crossposting plugin.

WooCommerce API – Product Sync with Multiple Stores

First of all we have to decide what it actually means – to sync products between sites? Let’s consider two scenarios here.

  1. Update a product with the same SKU on other WooCommerce stores automatically when it was updated by an administrator or a shop manager on the “Main store”. You can decide whether you would like to update a specific product data or all product data. And it is what we are going to do in this tutorial with code or with my WooCommerce product sync plugin.
  2. Update product stock status and quantity on other WooCommerce stores not only when this product was updated by an administrator but also when the product was purchased (and its quantity was descreased, obviously). We are going to talk a little bit about it in this tutorial as well, but I recommend you to take a look at my another plugin which is intended to help you with that.

In case you decide to use the plugin a metabox “Publish on” will appear.

WooCommerce API product sync with multiple stores
This is how my WooCommerce product sync plugin works but you can also use the code option from this tutorial.

Include Meta Data When Updating Users via REST API

In my another tutorial about syncing users using WordPress REST API I received a question in comments, where I was asked about metadata. After googling for quite a bit I found out that there is no clear explanation out there about using user’s meta in REST API requests.

Speeding Up WooCommerce API

I’ve been working with WooCommerce REST API for quite a while now, well, I developed a couple of plugins – Simple WordPress Crossposting and Simple Inventory Sync and both of them are relying on WooCommerce REST API.

And when you develop something that is intended to be used not only on your test website with 5 products total but also on high load websites, when orders can contain more than 100 products and variations, of course you should always keep performance in mind.

In this tutorial I will share with you some simple simple yet effective tips and tricks.