Make-Lemonade / lemonsqueezy-wp-updater-example

18 stars 3 forks source link

Problem with activation limit display for unlimited license #3

Open petrokrupenia opened 1 year ago

petrokrupenia commented 1 year ago

In the class-settings-page.php in line 88 plugin shows message $message = "License is active. You have {$license_message->data->license_key->activation_usage}/{$license_message->data->license_key->activation_limit} instances activated.";

But if you check "Set as unlimited" in the License Details you will get null as $license_message->data->license_key->activation_limit value and message "License is active. You have 1/ instances activated".

petrokrupenia commented 1 year ago

Our way to fix problem

$limit = ! empty( $license_message->data->license_key->activation_limit )
        ? $license_message->data->license_key->activation_limit
        : '∞';