Skip to content

Commit

Permalink
Use the user_has_vip_support_role method to check if the user is a …
Browse files Browse the repository at this point in the history
…support user. (#5965)

Co-authored-by: Rinat K <[email protected]>
  • Loading branch information
vaurdan and rinatkhaziev authored Nov 6, 2024
1 parent ec847df commit 70bd805
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vip-parsely/vip-parsely.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

use Automattic\VIP\Parsely\Telemetry\Telemetry;
use Automattic\VIP\Parsely\Telemetry\Tracks;
use Automattic\VIP\Support_User\User as Support_User;

/**
* This is determined by our value passed to the `WP_Widget` constructor.
Expand Down Expand Up @@ -89,7 +90,7 @@ function (): void {
add_filter( 'wp_parsely_current_user_can_use_pch_feature', function ( $current_user_can_use_pch_feature, $feature_name, $current_user ) {
$user_id = $current_user->ID;

if ( user_can( $user_id, 'vip_support' ) ) {
if ( Support_User::user_has_vip_support_role( $user_id ) ) {
return true;
}

Expand Down

0 comments on commit 70bd805

Please sign in to comment.