File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 55use Elementor \Widget_Base ;
66use SimplyBook \App ;
77use SimplyBook \Traits \HasApiAccess ;
8+ use SimplyBook \Http \Entities \Service ;
9+ use SimplyBook \Http \Entities \ServiceProvider ;
810
911class ElementorWidget extends Widget_Base
1012{
@@ -169,9 +171,10 @@ private function getServicesOptions(): array
169171 return []; // we shouldn't be here
170172 }
171173
172- $ services = App::provide ('client ' )->getServices (true );
174+ $ serviceEntity = new Service ();
175+
173176 return $ this ->buildOptionsFromApiData (
174- is_array ( $ services ) ? $ services : [] ,
177+ $ serviceEntity -> all () ,
175178 esc_html__ ('Select a service ' , 'simplybook ' )
176179 );
177180 }
@@ -185,9 +188,10 @@ private function getProvidersOptions(): array
185188 return []; // we shouldn't be here
186189 }
187190
188- $ providers = App::provide ('client ' )->getProviders (true );
191+ $ providerEntity = new ServiceProvider ();
192+
189193 $ options = $ this ->buildOptionsFromApiData (
190- is_array ( $ providers ) ? $ providers : [] ,
194+ $ providerEntity -> all () ,
191195 esc_html__ ('Select a service provider ' , 'simplybook ' )
192196 );
193197
You can’t perform that action at this time.
0 commit comments