Kyon147 / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
331 stars 98 forks source link

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

Open alamriku opened 3 months ago

alamriku commented 3 months ago

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 commented 3 months ago

@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?