My pledges: Correct user check for displaying details

This commit is contained in:
Kelly Dwan 2024-09-02 19:10:50 -04:00
parent e90b06bef9
commit c247e1325c
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D

View file

@ -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(