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

Unable to set freemium flag on app uninstallation. #279

Closed
alamriku opened this issue Mar 12, 2024 · 2 comments
Closed

Unable to set freemium flag on app uninstallation. #279

alamriku opened this issue Mar 12, 2024 · 2 comments
Labels
bug Something isn't working unconfirmed Bug has not been reproduced yet

Comments

@alamriku
Copy link
Contributor

alamriku commented Mar 12, 2024

Expected Behavior

$freemium = Util::getShopifyConfig('billing_freemium_enabled');
        if ($freemium=== true) {
            // Add the freemium flag to the shop
            $shopCommand->setAsFreemium($shopId);
        }

If billing_freemium_enabled is true, but the Freemium flag is not set, the condition is not working properly.

Current Behavior

if condition is always false for billing_freemium_enabled

Failure Information

Assigning the billing_freemium_enabled value to variable $freemium causing the issue. If we use the below code

if (Util::getShopifyConfig('billing_freemium_enabled') === true) {
            // Add the freemium flag to the shop
            $shopCommand->setAsFreemium($shopId);
        }

then it is working. I have found that we are using same type of condition check on Billable middleware

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

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. install the shopify app then
  2. uninstall the app

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Package Version: v19.2.0
  • Laravel Version: v10.10.0
  • PHP Version: v8.3.3
  • Template Engine: React
  • Using a toolset (Docker, Laradock, Vagrant, etc.): Valet linux

Failure Logs

Please include any relevant log snippets or files here.

@alamriku alamriku added bug Something isn't working unconfirmed Bug has not been reproduced yet labels Mar 12, 2024
@Kyon147
Copy link
Owner

Kyon147 commented Mar 12, 2024

@alamriku you have a type, you are missing a $ for your if statement - it should be like this but not tested it.

$freemium = Util::getShopifyConfig('billing_freemium_enabled');
        if ($freemium=== true) {
            // Add the freemium flag to the shop
            $shopCommand->setAsFreemium($shopId);
        }

This does not look like an issue with the package, so going to close this issue but if you can provide more information on it being one, we can re-open.

@alamriku
Copy link
Contributor Author

Sorry my mistake. I have missed the dollar sign on the description. The issue related with package. I have created a PR 280

Kyon147 added a commit to alamriku/laravel-shopify-by-Kyon147 that referenced this issue Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed Bug has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

2 participants