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

Update uninstall job for checking the freemium flag (Type Juggling]) #280

Conversation

alamriku
Copy link
Contributor

Issue : #279

$freemium = Util::getShopifyConfig('billing_freemium_enabled');
        if ($freemium === true)

For some reason was not working. Type Juggling.

I have found that Billable middleware is checking same types of condition. I have implemented that and it is working.
From Billable middleware

if (Util::getShopifyConfig('billing_enabled') === true) { }

@Kyon147
Copy link
Owner

Kyon147 commented Mar 12, 2024

@alamriku semantically, these are doing the same thing you are just storing the result in a variable. So not sure why one would work and the other not.

Is there inconsistent return types from the Util method as billing_freemium_enabled does not mean that it is always true when billing_enabled is?

Copy link
Owner

@Kyon147 Kyon147 left a comment

Choose a reason for hiding this comment

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

As this is a little cleaner I think we should use this.

…_set_freemium_flag_on_uninstall_job
@Kyon147 Kyon147 merged commit c9eb7df into Kyon147:master Sep 24, 2024
10 checks passed
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.

None yet

2 participants