Main > WooCommerce > WooCommerce Module for CybroERP Advance
< All Topics
What Is WooCommerce?
- WooCommerce is a WordPress plugin for eCommerce.
- It’s the most customizable platform for online businesses.
- It offers numerous plugins, payment, and shipping gateways for added functionality.
- WooCommerce is the web’s most popular eCommerce platform
What is the WooCommerce Module for CybroERP?
The WooCommerce module for CybroERP is a premium add-on for the POS application. It simplifies product, stock, and order synchronization, enabling you to launch an online shop directly from your POS in minutes, without managing multiple software.
Features in WooCommerce module:
- Synchronize product categories from POS to your online WooCommerce-based webshop. (POS to WooCommerce)
- Synchronize products from POS to your online WooCommerce-based webshop. (POS to WooCommerce)
- Update stock details from POS to WooCommerce (POS to WooCommerce)
- Synchronize Orders from WooCommece to POS (WooCommerce to POS)
- Assign different prices for the webshop. (Using Selling Price Group feature)
- Map taxes
- Shows the detailed synchronization logs.
- Auto Synchronization based on Cron jobs.
- Customizable products field for synchronization during product creation & update.
- Synchronize product price Including Tax or Excluding tax. Features in WooCommerce module:
API Settings
To connect CybroERP to WooCommerce, we need to provide the API details of the WooCommerce shop.

“Click here” for more information & tutorials for how to set API Keys.

Generate API keys by the following instructions.
- In the permissions select “Read/Write” access.
- Copy & Paste “Consumer Key” & “Consumer Secret” them in WooCommerce Consumer Key & WooCommerce Consumer Secret.

- WooCommerce App URL: Enter the URL where the WooCommerce shop is set up (For example, http://www.yourstore.com or https://www.yourstore.com)
- IMPORTANT: Make sure to add HTTP or HTTPS before the WooCommerce app URL.

NOTE: After enabling this option, you have to add a cron job & auto-sync will happen based on the frequency of the cron job. It is advisable to keep this frequency less.

- Enable Auto Sync: If you want the data to be auto-synced, then enable this option.
- NOTE: After enabling this option you have to add a cron job & auto-sync will happen based on the cron job frequency. It is advisable to keep this frequency less.
Product Sync Settings

- Default Tax Class: WooCommerce assigns a tax class to each item. Here you have to provide the default tax class which is used in WooCommerce.

Sync Product Price: This specifies if the product price that will be sent to WooCommerce will include tax or exclude tax.

Default Selling Price Group: If you want to set a different price for products in WooCommerce than in your POS system, you can create a Selling Price Group in the POS and assign it specifically for WooCommerce.

Product fields to be synced with WooCommerce while creating products: Here you can select the fields that will get synced to WooCommerce from POS while creating a new product.

Product fields to be synced with WooCommerce while updating products: Here you can select the fields that will get synced to WooCommerce from POS while updating an already created product. This option can be very useful if you want the POS to overwrite some of the fields while updating products.

Using the Module:
After installation, you will find the WooCommerce menu at the bottom of the left navigation bar. Click on it & go to the Sync menu.

Here you will find the options to sync Categories, Products, Orders & Tax.
Sync Product Categories:

Click on this “Sync button” to synchronize the categories & Sub-Categories present in CybroERP to WooCommerce.
Map Tax Rates:

This option is used to map the taxes present in CybroERP to the taxes present in WooCommerce.
This is useful for adding related tax for a product during creation & updating.
NOTE: You must map the taxes before Synchronizing Products & Orders.
Sync Products:
Ensure the following steps for syncing products between CybroERP and WooCommerce:
- Disable WooCommerce Sync: Check that the “Disable WooCommerce Sync” option is not selected in the Add/Edit Product(s) section.
- Location Assignment: If you manage multiple locations in CybroERP, make sure the products are assigned to the location linked with WooCommerce. You can confirm this under API Settings → Business Location.
- Product Types: Only single and variable products can be synced.
Please note that syncing products is a time-consuming process. It can take 30 minutes or more, depending on the number of products. Avoid refreshing or leaving the page while the synchronization is in progress to ensure a smooth operation.
Simple & Variable product synchronization is supported:
It has 2 options:

- Sync only new products: Using this option only newly created products in POS are created in WooCommerce. This option can be less time-consuming, again it depends on the number of products.
- Sync All: Using this option all newly created products are created in POS & existing products are updated. Since it does both the operation of creation & updating it will be more time-consuming than the previous option.
Sync Orders:

This option is used to get all orders on the WooCommerce website to CybroERP.
All newly created or updated orders after the last sync get added to CybroERP. A special tag is also added to the order to mark it as an order from WooCommerce.
NOTE: Orders going to draft:
Reason 1:
When an order or sale from WooCommerce is synced with CybroERP, it may be moved to a draft status if there isn’t enough stock available in CybroERP.
For example, if a WooCommerce order requests 10 pens, but CybroERP only has 7 in stock, the order won’t be skipped. Instead, it will be saved as a draft, allowing you to update the stock quantity and finalize the order later.
Reason 2:
CybroERP uses the below order mapping.
‘pending’ => ‘draft’,
‘processing’ => ‘final’,
‘on-hold’ => ‘draft’,
‘completed’ => ‘final’,
‘cancelled’ => ‘draft’,
‘refunded’ => ‘draft’,
‘failed’ => ‘draft’,
‘shipped’ => ‘final’
So, for example, if the order is pending in WooCommerce then it will be marked as a draft in CybroERP, similarly for other statuses.
NOTE: Automating Orders sync:
You can automate the order syncing by using the Order webhook described below.
Reset Synced Categories / Reset Synced Products:

- When you click on “Sync Products”, it creates the products from your POS system in WooCommerce and establishes a connection between the two. This link is made by storing the WooCommerce product ID in the POS database, allowing the two systems to sync seamlessly.
- If you later click on “Reset Synced Products”, this connection will be removed. In technical terms, the WooCommerce product IDs stored in the POS system will be deleted, effectively breaking the link. This feature is useful if you’re switching to a different WooCommerce website.
- After resetting, if you click “Sync Products” again, the system will check if products with the same SKU already exist in WooCommerce. If they don’t, it will create the products in WooCommerce and store their IDs in the POS system to re-establish the connection.
Note: deleting products in WooCommerce is not required if the SKU for products in WooCommerce & POS is the same.
The same applies to Categories also.
Using Order Webhook:
What is a webhook:
Webhooks lets you instantly receive live orders from WooCommerce directly into CybroERP.
Whenever a new order is placed on your WooCommerce website, it’s immediately sent to CybroERP without any delay.
This feature makes the module highly efficient and convenient to use.
Setting up Webhook:

1 . Go to WooCommerce -> API settings -> WebHook settings, there you will find Order Created, Order Updated, Order Deleted, and Order Restored webhook settings containing Webhook Secret & Webhook Delivery URL’
2 . Copy the Webhook Delivery URL for Order Created and create a new Webhook in WooCommerce.
- Name: Give any name that you can recognize.
- Status: Active
- Topic: Order Created
- Delivery URL: Paste the order-created delivery URL from CybroERP.
- Secret: keep it blank.
- API version: WP REST API version 2
3 . Click on “Save Webhook” in WooCommerce.
4 . Copy the Generated “Secret” from WooCommerce and paste it to the Webhook Secret of CybroERP Order Created.
5. Repeat the above process for all others (Order Updated, Order Deleted, Order restored)
After configuring when a new order comes it will also be updated in CybroERP.
Error 1:
Sometimes during synchronizing, you may get the following message/error
“live.EMERGENCY: File:………\vendor\automattic\woocommerce\src\WooCommerce\HttpClient\HttpClient.phpLine:375Message:Syntax error”
Solution:
In your WooCommerce “API Settings” change the “Woocommerce App URL” by adding “index.php” to it.
Example: Change the URL from
http://www.myWooCommerceStore.com to http://www.myWooCommerceStore.com/index.php
Error 2:
Sometimes in WooCommerce API bulk operations (add/edit/delete) are restricted. So it will give an error like
“Sorry, you are not allowed to batch manipulate this resource. [woocommerce_rest_cannot_batch]”
To resolve this error, follow this steps:
Install & activate the Code Snippet plugin in WordPress. https://wordpress.org/plugins/code-snippets/
Go to Snippet -> Add New and add a new snippet
The snippet will have below written codes:add_filter( ‘woocommerce_rest_check_permissions’, ‘allow_bulk_operation’, 10, 4 ); function allow_bulk_operation( $permission, $context, $object_id, $type ) { return true; }
Save & Activate it.
Now it will allow the bulk operation from API.
Error 3:
No syncing issue.
Solution:
Follow the below steps:
Open the WordPress website .htaccess file
Add these 2 lines in the very top of the htaccess file, similar to the below screenshot: RewriteEngine on
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
After adding it, save the file and try to sync from CybroERP once again.
Error 4: Image not syncing
Sometimes products don’t sync because of a problem in the image file name and image format.
Solution:
WooCommerce has some restrictions which can be fixed by following this:
Try replacing all product images with jpeg or png format.
Shorten the file name length as well for the images.
Adding/Editing custom Order status:
In WooCommerce you can add more order statuses. But in CybroERP we have mapped the default WooCommerce statuses to CybroERP status.
But you can easily add or modify this mapping.
Open this file: pos/Modules/Woocommerce/Utils/WoocommerceUtil.php
Search for the function: woocommerceOrderStatusToPosSellStatus
Change the status as per your need.
Status in the left side(Key) is for WooCommerce & right side(Value) is for CybroERP.