WoocommercePRO

Docs Field Groups Locations Woocommerce

#Woocommerce

ACF Extended adds a new location allowing to display ACF fields on Woocommerce pages.

Location

Create a set of rules to determine edit screens

Show this field group if

and

#Fields Values

By default, fields values are saved using the related page ID.

You can retrieve the value using the common get_field() function, in combination with wc_get_page_id() (see documentation).

Usage example:

$my_field = get_field('my_field', wc_get_page_id('cart'));      // cart page
$my_field = get_field('my_field', wc_get_page_id('checkout'));  // checkout page
$my_field = get_field('my_field', wc_get_page_id('myaccount')); // my account page
$my_field = get_field('my_field', wc_get_page_id('shop'));      // shop page
$my_field = get_field('my_field', wc_get_page_id('terms'));     // terms page