Shopify app Shopify应用程序开发问题-卸载挂钩被匿名解雇

Shopify app Shopify应用程序开发问题-卸载挂钩被匿名解雇,shopify-app,Shopify App,我已经开始了shopify应用程序的开发,但是我在应用程序安装中注册的卸载挂钩匿名启动。请确认如何解决这个问题,我已经发送了标题作为响应,这是需要的,但是钩子会随时触发 以下是卸载功能的代码: public function appuninstall() { header("HTTP/1.1 200 OK"); $session = new Session(new NativeSessionStorage(), new AttributeBag()); $request = Reques

我已经开始了shopify应用程序的开发,但是我在应用程序安装中注册的卸载挂钩匿名启动。请确认如何解决这个问题,我已经发送了标题作为响应,这是需要的,但是钩子会随时触发

以下是卸载功能的代码:

public function appuninstall() {
 header("HTTP/1.1 200 OK");
 $session = new Session(new NativeSessionStorage(), new AttributeBag()); 
 $request = Request::createFromGlobals(); $shop = $request->query- 
 >get('shop');
 $repository = $this->getDoctrine()->getRepository(Stores::class); 
 $store = $repository->findOneBy(['name' => $shop]);
 $em = $this->getDoctrine()->getManager(); 
 $em->remove($store);
 $em->flush();
 $session->remove('shop'); 
}

我已经在我的重定向url函数中注册了这个webhook。请帮我解决这个问题。

你能把代码贴在这里吗。如果将来链接中断,对新用户将没有帮助。当然,下面是卸载函数的代码:公共函数appuninstall(){header(“HTTP/1.1 200 OK”);$session=new session(new NativeSessionStorage(),new AttributeBag();$request=request::createFromGlobals();$shop=$request->query->->get('shop');$repository=$this->getdoctor()->getRepository(Stores::class);$store=$repository->findOneBy(['name'=>$shop]);$em=$this->getdoctor()->getManager();$em->remove($store);$em->flush();$session->remove('shop');}你知道为什么会出现这个问题吗?我不明白你的问题。你想说这个webhook是在没有卸载的情况下启动的吗?或者你不能将触发它的存储区分开。