v1.8.0
This commit is contained in:
parent
c7a8d9efcc
commit
1460cb231f
6 changed files with 63 additions and 16 deletions
|
|
@ -298,10 +298,18 @@ $compat_warnings = 0;
|
|||
$raw_bound = $sub_row['bound_domain'] ?? '';
|
||||
$bound_text = is_string( $raw_bound ) ? trim( $raw_bound ) : '';
|
||||
|
||||
// Multi-license: how many licenses the account
|
||||
// holds for this plugin (Core 1.14.0+).
|
||||
$raw_count = $sub_row['license_count'] ?? 1;
|
||||
$count_int = is_numeric( $raw_count ) ? (int) ( $raw_count + 0 ) : 1;
|
||||
$count_txt = $count_int > 1 ? ' ×' . $count_int : '';
|
||||
|
||||
if ( '' !== $bound_text && in_array( $sub_status, array( 'active', 'payment_failed' ), true ) ) {
|
||||
$sub_text = '' !== $sub_text
|
||||
? $sub_text . ' @ ' . $bound_text
|
||||
: $bound_text;
|
||||
? $sub_text . ' @ ' . $bound_text . $count_txt
|
||||
: $bound_text . $count_txt;
|
||||
} elseif ( '' !== $count_txt ) {
|
||||
$sub_text = '' !== $sub_text ? $sub_text . $count_txt : 'Subscribed' . $count_txt;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue