Helper: Add "shared" labels for shared subscriptions.

This commit is contained in:
Konstantin Kovshenin 2017-08-28 11:59:13 +03:00
parent 6b14b83cd2
commit 94dbdc86b9
1 changed files with 5 additions and 1 deletions

View File

@ -77,7 +77,11 @@
} else {
_e( 'Subscription: Unlimited', 'woocommerce' );
}
if ( isset( $subscription['master_user_email'] ) ) {
// Check shared.
if ( ! empty( $subscription['is_shared'] ) && ! empty( $subscription['owner_email'] ) ) {
printf( '</br>' . __( 'Shared by %s', 'woocommerce' ), esc_html( $subscription['owner_email'] ) );
} elseif ( isset( $subscription['master_user_email'] ) ) {
printf( '</br>' . __( 'Shared by %s', 'woocommerce' ), esc_html( $subscription['master_user_email'] ) );
}
?>