Up to 50 percent off

Product_cat field as default WooCommerce field

This topic contains 1 reply and 2 voices, and was last updated by Tareq Hasan 10 years, 11 months ago
Viewing 1 Posts - 1 through 1 (of 1 total)
Author Posts
December 19, 2013 at 8:18 pm 13808
Tareq Hasan Hi there, I’ve set up a website for an art community allowing artist to upload their art on a website for customers to either rent our buy. I’m using WooCommerce as a platform for this. I thought it made sense for the artists’ ‘first + last name’ to be used as a ‘category’ in the WooCommerce terminology. Artists are first registering on the site with name and address etc. and are then asked to upload their art in a second subsequent form. In this second form, I have a field called ‘Artist name’ that is linked to WooCommerce ‘product_cat’ field – which works great. Though, some artist enter their first name whereas others enter both their names – leading to inconsistencies. Is there a way to solve this? For example by adding a hidden field automatically setting the value of the product_cat field to the artist’s ‘name + surname’ (already captured during the artist registration)? I could make the category to only equal the artist’s surname but would still need to know how to set the product_cat field to another WooCommerce field already captured? Hope that makes sense. Thanks in advance, Mattias.
December 21, 2013 at 2:21 pm 13865
Tareq Hasan Tareq Hasan

You need to use action hook field to put a hidden field there.
http://docs.wedevs.com/using-action-hook-field/

Viewing 1 Posts - 1 through 1 (of 1 total)