Home Forums General Issues ACF or product attributes?


ACF or product attributes?

  • I’m managing a WooCommerce webshop, and have the need to display various attributes for the different products, from simple things like “color” and “country of origin” to whether or not the item is assembled or not. But also things like weight, length, height etc (for the product, not the box it is shipped in). So some of these attributes will be different for each product.

    I have previously done this both using the native product attributes in WP, but also with ACF. What are you guys thoughts here, what would be advantages/disadvantages with each? Anyone else setup something similar?

    For now, the product info will need to be imported via csv on a regular basis (whenever new stock is added) but in the future we hope to expand this to pushing via API.

  • One thing that you have to remember when using attributes is that attributes is a taxonomy and each “attribute” is also taxonomy. So you have nested taxonomies. If you add something like a length “attribute” then each “length” is a term in the “Length” taxonomy.

    So one determining factor is if you can do what you want using terms and all of the associated functionality that goes along with a taxonomy, and also to this withing the functionality provided by WC to work with these attributes.

    ACF field values are not terms they are post_meta and work entirely different to terms.

    Terms are great when you want to create pages that allow you to list all of the posts in a term. They can also be used to build an advanced search that can show posts based on values in 2 or more terms. or use a plugin built by a third party that is able to perform searches of this nature.

    ACF fields are not really good at creating pages devoted to a specific value. Yes, this can be done but it means that you must create custom pages with a customized search application to get it done and finding a plugin that will do this for you will be more difficult.

    As far is importing, if you use attributes then in most cases you can use the WC built in importer. There are also various plugins already available that work with various ERP systems.

    If you use ACF then you will need to get an importer (such as WP All Import Pro) that is aware of ACF fields and can be use to import these fields along with WC content. In all cases you’re going to need to build a custom import template for your data. Automated imports can be set up to run from a URL and you’d need to upload the import file to a URL on a regular bases.

    Another plus of using attributes is the fact that they are built into the WC product interface where ACF fields would be a separate area of the product admin page. This could be seen as more confusing to maintain by users.

    I don’t have an solid answer for you. For me it would depend on exactly what is needed and why. But in general when working with WC I try do as much within WC as possible and only using ACF when I must. The reason for this is that making changes to WC is more complicated than building ACF into some other type of CPT would be.

  • Thank you for this thorough comparison, very much appreciated! We might need to consider a combination of both for our use case. Thanks again!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.