This integration supports a two-way synchronization of products and customers between the two applications and a one-way synchronization of orders from the WordPress website to your coreBOS. So we will be able to automatically receive all our website orders inside coreBOS where we can manage them in our business logic while triggering all our workflows and business processes.
Once configured the integration just works transparently in the background.
The configuration has two parts, one in coreBOS and the other in WooCommerce.
In WooCommerce
https://your_corebos_server/your_corebos/notifications.php?type=wcintegration
In coreBOS
https://your_corebos_server/your_corebos/index.php?module=Utilities&action=index
php include//cbmqtm/run.php
you have to make sure this process is running continuously for the integration to work
Here you have a video presentation of the steps and the functionality.
These are the two maps I used for testing:
WC2Products
<map> <originmodule> <originname>woocommerce</originname> </originmodule> <targetmodule> <targetname>Products</targetname> </targetmodule> <fields> <field> <fieldname>productsheet</fieldname> <Orgfields> <Orgfield> <OrgfieldName>slug</OrgfieldName> </Orgfield> </Orgfields> </field> <field> <fieldname>description</fieldname> <Orgfields> <Orgfield> <OrgfieldName>description</OrgfieldName> </Orgfield> </Orgfields> </field> </fields> </map>
Products2WC
<map> <originmodule> <originname>Products</originname> </originmodule> <targetmodule> <targetname>woocommerce</targetname> </targetmodule> <fields> <field> <fieldname>stock_quantity</fieldname> <Orgfields> <Orgfield> <OrgfieldName>qtyinstock</OrgfieldName> </Orgfield> </Orgfields> </field> </fields> </map>
We have created a module named wcProductImage which is supported natively by this integration. It permits you to save images with meta information that will be sent to WooCommerce. Contact us if you are interested.
In WooCommerce the description will be stored in the wp_posts table inside post_content column. In general WordPress uses some filters to encode and decode the value of post_content before saving and displaying it. You need to use Wordpress wp_insert_post_data hook to modify the passed value of post_content before saving it to the database.
You can modify that hook like this;
add_filter( 'wp_insert_post_data' , 'filter_post_data' , '99', 2 ); function filter_post_data( $data , $postarr ) { // Change post content $data['post_content'] = html_entity_decode($data['post_content']); return $data; }
The goal is to save the raw data with html tags on the database. That script can be added to your child theme’s functions.php file or via a plugin that allows custom functions to be added.