Home Forums ACF PRO How to pull WooCommerce Fields like SKU?


How to pull WooCommerce Fields like SKU?

  • G’day All,

    I’ve tried to find information on the forum, within the plugin/support blog. Whilst I’m not a complete n00b – I do feel like I’m missing the basics here.

    I’ve got basic ACF Fields being shown on the product page so I know ACF is working as intended.
    ie. [acf field="product_specifications_material"]

    I need to create a table of product specifications on my Woocommerce website, some products technically have multiple skus, of which variants change the code presented.

    Example: Widget A / Widget B / Widget C = WA, WB, WC.
    At the bare basics, I was hoping to pull the current post/product SKU using ACF, then modifying using the “repeater” function. As so much data is already within the product meta field, I was hoping to re-use rather than need to update two variables.

    Thus far, I’ve been unable to find any function that exists within ACF to simply pull existing WooCommerce Data. Am I missing something here?

  • There is no function in ACF to get metadata that is created by another plugin or some other code. In fact ACF deliberately blocks the ability get field values that are not created/saved by ACF. You will need to use either the WC functions or use the WP function get_post_meta() to get these values.

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

You must be logged in to reply to this topic.