I have a template page with some ACF fields. That page is restricted using Woocommerce Memberships.
Seems that the main content is restricted but after the Restricted Content message all the ACF fields are there. How can I hide those fields when all the other content is restricted?
I saw some solution but it is for paidmemberships plugin – https://www.paidmembershipspro.com/restrict-the-display-of-advanced-custom-fields-acf-fields-by-membership-level/
There is something like this for WooCommerce Memberships?
Thanks.
You need to add something around the content for ACF. For example, if you password protect you would use
if (!is_password_required()) {
// show acf content
}
You will need to see if there is something similar in the memberships plugin
Here’s what you are looking for with regards to WooCommerce Memberships and Restricted Content:
if (! wc_memberships_is_post_content_restricted()) {
// show acf content
}