shreejalmaharjan-27 / wooclient
A Woocommerce REST API client
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/shreejalmaharjan-27/wooclient
Requires
- php: >=8.0
This package is auto-updated.
Last update: 2025-09-24 16:54:42 UTC
README
Install
composer require shreejalmaharjan-27/wooclient
Usage
Require composer autoload file and load classfiles
use Shreejalmaharjan27\Wooclient\Category; use Shreejalmaharjan27\Wooclient\Product; use Shreejalmaharjan27\Wooclient\WooClient; require __DIR__.'/vendor/autoload.php';
Create WooClient Object (with trailing slash on website address)
$wooclient = new WooClient("ck_xxxxx,"cs_xxxxx","https://wordpress.example.com/");
Create a Product
$product = new Product($wooclient); $product->create(name: 'Example Product', price: 18.00, image: 'https://example.com/image.jpg');
Create a Product Category
$category = new Category($wooclient); $category->create(name: 'Example category');