This repository was archived by the owner on Jun 25, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 1
- # woocommerce-product-inventory-datastore
2
- Sample WooCommerce DataStore for products, overrides inventory count
1
+ # Demo Inventory Data Store for WooCommerce Products
2
+
3
+ This demo shows an example of how to extend existing Data Stores in WooCommerce.
4
+
5
+ ** NOTE: This is demo code and not even close to being something you want to use in production.**
6
+
7
+ It extends an existing Product Data Store, and overrides only the inventory count,
8
+ replacing the database count with one retrieved from an external API.
9
+
10
+ ## Try it out!
11
+
12
+ This plugin has everything needed to try out the example code.
13
+
14
+ ### Pre-Setup
15
+
16
+ 1 . Set up a test WooCommerce site.
17
+ 2 . Add 3 products with SKUs of "p120", "p121", and "p122", set stock quantities.
18
+
19
+ ### Plugin Setup
20
+
21
+ 1 . Clone this repository under ` wp-content/plugins ` .
22
+ 2 . Under the ` server ` directory run ` npm install ` then ` npm start ` to run the test API server.
23
+ 3 . Activate the "WooCommerce Product Inventory Datastore" plugin.
24
+ 4 . Observe the products with the SKUs above now receive inventory counts from the API instead of ` wpdb ` .
You can’t perform that action at this time.
0 commit comments