From 004efaff41ebe385086a18f1f0b3fe5b0f0ab8ae Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Tue, 13 Jun 2017 23:07:17 +1000 Subject: [PATCH] Display error if no plans are associated with required role in WordPay. --- modules/sportspress-wordpay.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/sportspress-wordpay.php b/modules/sportspress-wordpay.php index 10feff8b..4c54d1c1 100644 --- a/modules/sportspress-wordpay.php +++ b/modules/sportspress-wordpay.php @@ -83,8 +83,7 @@ class SportsPress_WordPay { $plans = get_posts( $args ); if ( empty( $plans ) ) { - _e( 'There are no plans associated with the Team Manager role.', 'sportspress' ); - return; + return '

' . __( 'There are no plans associated with the Team Manager role.', 'sportspress' ) . '

'; } return self::register_form( $atts, 'team', $plans ); @@ -110,8 +109,7 @@ class SportsPress_WordPay { $plans = get_posts( $args ); if ( empty( $plans ) ) { - _e( 'There are no plans associated with the Player role.', 'sportspress' ); - return; + return '

' . __( 'There are no plans associated with the Player role.', 'sportspress' ) . '

'; } return self::register_form( $atts, 'player', $plans );