Hello,
Using CPT UI I create a custom taxonomy for Woo products, let’s call it CPT Brands (slug: cpt_brands).
Then using ACF I create the field ACF Note for the new taxonomy.
Under CPT Brands I create the term Company and add a text in the field ACF Note.
I edit a product and associate it with the brand Company.
Hooking into the single product I now wish to output the ACF Note using ACF:
add_action('woocommerce_after_add_to_cart_form','extra_product_info', 100);
if (!function_exists('extra_product_info')) {
function extra_product_info() {
echo '<pre>' . print_r(get_the_ID()) . '</pre>';
echo '<pre>' . print_r(get_field('acf_note')) . '</pre>';
}
}
It doesn’t work. What am I doing wrong?
Thanks!