Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

License key is not saved to pass data during activation #8961

Closed
robincornett opened this issue Nov 1, 2021 · 0 comments · Fixed by #8962
Closed

License key is not saved to pass data during activation #8961

robincornett opened this issue Nov 1, 2021 · 0 comments · Fixed by #8962
Assignees
Labels
Milestone

Comments

@robincornett
Copy link
Contributor

Bug Report

Expected behavior

When I activate a pass' license key, I expect the license key to be added to the edd_pass_licenses option data, per the code:

if ( ! empty( $api_data->pass_id ) && ! empty( $api_data->license ) && 'valid' === $api_data->license ) {
$passes[ $license ] = array(
'pass_id' => intval( $api_data->pass_id ),
'time_checked' => time()
);

Actual behavior

When I activate a license, the $license variable for the array key is not defined. During activation, the class property for the license is not set, so we need to use the key that's being evaluated/saved to the database.

Steps to reproduce the behavior

  1. Activate a license for any pass.
  2. Check the edd_pass_licenses data in the database. The pass ID and timestamp will be saved, but without the license key.

Information (if a specific version is affected):

PHP Version: 7.4
EDD Version (or branch): master
WordPress Version: 5.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants