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

[garbage-collector] Fixed an issue related to modified slugs. #692

Merged

Conversation

fajardoleo
Copy link
Contributor

No description provided.

@fajardoleo fajardoleo self-assigned this Mar 14, 2024
} else if ( isset( $product->id ) && array_key_exists( $product->id, $option ) ) { /* all_licenses, add-ons, and id_slug_type_path_map */
$unset_option = false;

if ( ! isset( $active_products_by_id_map[ $product->id ] ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can improve the readability here a little.

$is_inactive_by_id = ! isset( $active_products_by_id_map[ $product->id ] );
$is_inactive_by_slug = (
    'id_slug_type_path_map' === $option_name &&
    (
        ! isset( $option[ $product->id ]['slug'] ) ||
        $slug === $option[ $product->id ]['slug']
    )
);

if ( $is_inactive_by_id || $is_inactive_by_slug ) {
    // do your thing 🥷 
}

@fajardoleo fajardoleo force-pushed the feature/garbage-collector-modified-slug-conflict-fix branch from 6addbad to 3f1afd4 Compare March 18, 2024 11:24
@Tobias-Conrad
Copy link

@fajardoleo @swashata i and one client affected. So we did the fixer plugin and good.

I feel that change is freemius internal, just a fix of the collector and should be released ASAP as fixes should be released.

As the freemius fixer is often a solution, build it inside the sdk and it would solve this problem and the others with licenses.
Add a reset license that trigger the fixer...

@swashata swashata force-pushed the feature/garbage-collector-modified-slug-conflict-fix branch from 3f1afd4 to 44e5e1c Compare March 31, 2024 11:30
@swashata swashata merged commit 44e5e1c into develop Mar 31, 2024
5 checks passed
@swashata swashata deleted the feature/garbage-collector-modified-slug-conflict-fix branch March 31, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants