Skip to content

Commit 099257c

Browse files
committed
Bypass advanced content restriction rules for super admins
1 parent aea1716 commit 099257c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

modules/content-restriction/class-urcr-frontend.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,10 @@ function wc_advanced_restriction_with_access_rule( $product_id ) {
10261026
public function run_content_restrictions() {
10271027
global $post;
10281028

1029+
if ( is_super_admin() ) {
1030+
return;
1031+
}
1032+
10291033
$content_restriction_enabled = ur_string_to_bool( get_option( 'user_registration_content_restriction_enable', true ) );
10301034

10311035
if ( ! $content_restriction_enabled ) {

0 commit comments

Comments
 (0)