Shopify / shopify-api-js

Shopify Admin API Library for Node. Accelerate development with support for authentication, graphql proxy, webhooks
MIT License
944 stars 390 forks source link

ShopifyApp::RequireKnownShop not worked for Shopify API version 2024-04 #1338

Closed Agnesh9512 closed 7 months ago

Agnesh9512 commented 7 months ago

I have updated the Shopify API version from 2023-07 to 2024-04.

The updated files are below

Gemfile -> gem 'shopify_app', '~> 21.6' to gem 'shopify_app', '~> 22.0', '>= 22.0.1'

Gemfile.lock -> shopify_api (13.3.0) to shopify_api (14.1.0) shopify_app (21.7.0) to shopify_app (22.0.1) shopify_app (~> 21.6) to shopify_app (~> 22.0, >= 22.0.1)

Shopify_app.rb -> api_version:"2023-07" to api_version:"2024-04"

The version was updated successfully but an issue was generated at AuthenticatedController for ShopifyApp::RequireKnownShop I have included it in my AuthenticatedController like this
include ShopifyApp::EmbeddedApp include ShopifyApp::RequireKnownShop include ShopifyApp::ShopAccessScopesVerification

After updating the latest Shopify API version it was said that "NameError (uninitialized constant ShopifyApp::RequireKnownShop ".

Have any solution for that NameError??

lizkenyon commented 7 months ago

Hi there 👋

I would recommend taking a look at the upgrade doc! :)

The following controller concerns have been renamed/replaced in v21.10.0 and have now been removed. To upgrade, please rename any usage in your apps's controllers that include them to the following:

Old Deprecated Controller Concern Replaced By New Controller Concern
Authenticated EnsureHasSession
RequireKnownShop EnsureInstalled

The new names better reflect what assurances the including the controller concern provide. The new concern provide similar if not identical functionality as the concerns they replaced.