Skip to content

Commit

Permalink
My pledges: Correct user check for displaying details
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle committed Sep 2, 2024
1 parent e90b06b commit c247e13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions themes/wporg-5ftf-2024/inc/block-bindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ function get_meta_binding_value( $args, $block ) {
number_format_i18n( absint( $contribution_data['hours'] ) ),
);
case 'user-contribution-details':
$user = wp_get_current_user();
if ( ! $user ) {
if ( ! is_user_logged_in() ) {
return '';
}

$user = wp_get_current_user();
$profile_data = XProfile\get_contributor_user_data( $user->ID );

$contributor_publish_query = new \WP_Query( array(
Expand Down

0 comments on commit c247e13

Please sign in to comment.