Copy and then sync post custom field values to Global Product Taxonomy
-
A client with a physical store uses a shop management software that I can sync with WooCommerce with a plug-in.
This store software has a CATEGORY and SUBCATEGORY fields on each product, that are synced with WooCommerce Product Categories.
However, the store software also has 4 other fields that client can customize. This field are imported in WooCommerce as Post Custom Fields, under each product (for example “customfield1/2/3/4”, and each product has its value). They’re NOT WooCommerce attributes, but standard WP post custom fields.
Problem
Since this custom field contains, for example, “Collection year” or “Brand”, I need to use them to create shop menu and filters together with the standard WooCommerce Categories that are already synced.
So basically I need a php function to copy and then sync those post custom fields to Global WooCommerce Taxonomies, or Attributes, or Tags, or Other Custom Taxonomies (I still have to figure out the best scenario) every time a product is created or updated.
The plug-in that syncs products with the store software have a manual sync that will be executed daily to updates existing products or create new ones.
Any help is appreciated, thanks.
- The topic ‘Copy and then sync post custom field values to Global Product Taxonomy’ is closed to new replies.