On a restricted page, we’re only seeing:
Oops, Restricted Content
We are sorry but this post is restricted to folks that have purchased this page.
But no product description or link.
In the settings page, it does show:
Oops, Restricted Content
[products ids='{{product_id}}’]
We are sorry but this post is restricted to folks that have purchased this page.
Help!
]]>I was able to get PMS restrictions?working for a single subscription’s product using the 2nd code segment?on?https://www.cozmoslabs.com/docs/paid-member-subscriptions/developer-knowledge-base/exclude-restricted-products-from-woocommerce-queries/
i.e. on a page with the [products] shortcode, only the product for the subscription is displayed.
However, I have 4 different subscription types. I duplicated the subscriptions and modified them to reflect the differences between the subscription types. Created 3 duplicates of the working product and modified the restrictions to reflect the matching subscriptions.
Only the first subscription works properly (i.e. going to the page with [products] shows the single product. Buying a subscription (different users) for the second, third & fourth products results in *nothing* being displayed on [products] page.
I dumped some of the variables. On the working product, the first element in the array of restricted products is missing (ie the product-id codes for all products except the desired product show as restricted), so the one product is displayed. On all the other products, *all* of the products are in the list of restricted product ids, so nothing is displayed, instead of the subscribed product.
ie, the arg array for the 1st working product is:
arg=Array ( [1] => 516 [2] => 524 [3] => 525 )
while when the page is displayed for non-working products, the result is
arg=Array ( [0] => 463 [1] => 516 [2] => 524 [3] => 525 )
]]>But after that, I cannot access (even when logged in) the node /wp-json/wp/v2/categories or /wp-json/wp/v2/taxonomies/category – both return itsec_rest_api_access_restricted error. Only way how I can achieve the result is adding manage_categories capability, which does not suit my case – I want this user / role to allow reading categories only, not managing. Is there any change I can make so the categories can be accessible via API (after logging in)
Thank you for your advice
]]>My site is a publicly accessible site but some parts are restricted. The site uses the standard WP search function (After a search command the URL is <domain.extenstion/?s=<term>). The search result archive page is built using the WP Bakery page builder. Somehow the page shows the restricted message for logged off users. I’d like this to be public. The search results (custom post type) should be visible for everybody but some posts are restricted.
The search page and the posts of this custom post type are not restricted by default. I can’t find any setting to remove the restriction from the search results page. Is there any option for this?
Thanks in advance for any reply.
]]>function country_product_query(array $country_terms, $operator1, $product_terms, $operator2) {
if ($operator1 === null) {
$operator1 = 'IN';
}
if ($operator2 === null) {
$operator2 = 'IN';
}
$term = get_term_by('slug', $product_terms, 'product_categories');
$term_name = $term->name;
$args = array(
// Arguments for your query.
'post_type' => array('post', 'page'),
'posts_per_page' => -1,
'tax_query' => array(
'relation' => 'AND',
array (
'taxonomy' => 'locations',
'field' => 'slug',
'terms' => $country_terms,
'include_children' => false,
'operator' => $operator1
),
array (
'taxonomy' => 'product_categories',
'field' => 'slug',
'terms' => $product_terms,
'include_children' => false,
'operator' => $operator2
)
)
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) {
echo '<strong>' . $term_name . '</strong>';
echo '<ul>';
while ( $the_query->have_posts() ) {
$the_query->the_post();
the_title( '<li><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></li>' );
}
echo '</ul>';
wp_reset_postdata();
}
}
]]>I have checked the logs and found no records there, and I have also checked the spam IP/email addresses, but there were no records there either. I asked the customer to place the order again and turned off CleanTalk, and the order went through without any issues.
We have also noticed that some regular customers who regularly place orders with us have been blocked today.
… How can we resolve this issue, and why are customers being blocked?
]]>can you help? thank you!
]]>I mainly manage a digital membership site. All of the content that is restricted for ‘members only’ does not appear on any of Jetpack’s Stats. This makes it difficult to know what content is being used by our members.
Is there a setting I need to enable to allow for the views/visitors to be tracked on restricted pages/posts?
Thanks in advance!
]]>