Display error if no plans are associated with required role in WordPay.
This commit is contained in:
@@ -83,8 +83,7 @@ class SportsPress_WordPay {
|
|||||||
$plans = get_posts( $args );
|
$plans = get_posts( $args );
|
||||||
|
|
||||||
if ( empty( $plans ) ) {
|
if ( empty( $plans ) ) {
|
||||||
_e( 'There are no plans associated with the Team Manager role.', 'sportspress' );
|
return '<p>' . __( 'There are no plans associated with the Team Manager role.', 'sportspress' ) . '<p>';
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::register_form( $atts, 'team', $plans );
|
return self::register_form( $atts, 'team', $plans );
|
||||||
@@ -110,8 +109,7 @@ class SportsPress_WordPay {
|
|||||||
$plans = get_posts( $args );
|
$plans = get_posts( $args );
|
||||||
|
|
||||||
if ( empty( $plans ) ) {
|
if ( empty( $plans ) ) {
|
||||||
_e( 'There are no plans associated with the Player role.', 'sportspress' );
|
return '<p>' . __( 'There are no plans associated with the Player role.', 'sportspress' ) . '<p>';
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::register_form( $atts, 'player', $plans );
|
return self::register_form( $atts, 'player', $plans );
|
||||||
|
|||||||
Reference in New Issue
Block a user