Answer the question
In order to leave comments, you need to log in
How to display custom field (ACF) of product on Woocommerce cart page?
Good afternoon!
Created a custom ACF field for products and displayed it in the product card, everything is displayed, tell me how to display this field on the cart page
PS: Created a custom field so that products have different classes \ id
Answer the question
In order to leave comments, you need to log in
Field values are retrieved via the ACF get_field() (or the_field) API. The first parameter is the name of the field, the second (optional) is the ID of the record with which this field is associated (there are still terms, users, options - but this does not apply to this issue). Take the product record ID and pass it to the function:the_field( 'field_name', $product_id );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question