Hi folks, total novice at php so i’m hoping someone can help me here.
I want to automatically fill a field in wordpress/woocommerce based on certain conditions.
I have lots of products on my site and i’m wish to update a field for google shopping, but currently only a manual action exists.
So my example is Product 1 has 2 categories > Hugo Boss & Shirts and Product 2 has 2 categories True Religion & Jeans
these are in the field product_cat. I some how need a function to apply the product_cat to _woocommerce_gpf_data but only the brand if Hugo Boss or True Religion exists in product_cat.
If thats not complicated enough, then _woocommerce_gpf_data is serialised too in the following format [php]a:1:{s:5:“brand”;s:3:“Hugo Boss”;}[/php]
I appreciate this is a tall order, but if anybody can assist i’d greatly appreciate it.
Thanks again !