This commit is contained in:
Javier Casares 2026-09-11 10:45:13 +00:00
commit 1460cb231f
6 changed files with 63 additions and 16 deletions

View file

@ -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;
}
}