I need a method of having some web-only products, which exist in Woocommerce but that don't sync with PHPPOS (or alternatively a method of hiding products from non-admins in PHPPOS - is that easier?)
I don't care if this is set per product, or set for whole categories of products.
1. One method using stock WC fields would be the 'catalog_visibility' field (which is available in the WC API). If 'catalog_visibility' = 'hidden' then the product would not be imported to PHPPOS.
2. Another method could be to use a specific tag: any products with the tag e.g. 'web-only' would not be synced.
3. The best method might be to create a custom field in Woocommerce product metadata. This would be a simple tickbox specifically to define whether the product is synced with PHPPOS or not. Product metadata is available in the WC API via the 'meta_data' field when listing products. However this would rely on users being able to add custom metadata to their products, or could be solved by a very simple WC plugin to add this functionality. (I would be more than happy to write this plugin and make it available, but I realise that doesn't solve issues of user support or future maintenance).
There is one complication... imagine a product which used to be synced between WC and PHPPOS. If this product is then changed to being 'web-only' in WC, it needs to then disappear from PHPPOS - but without being deleted from WC.
Please sign in to leave a comment.