Skip to content

Commit c0fc53c

Browse files
committed
fixed: merge conflict between NL14RSP2-66 and L14RSP2-121
1 parent 79d7e43 commit c0fc53c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

app/support/widgets/ElementorWidget.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
use Elementor\Widget_Base;
66
use SimplyBook\App;
77
use SimplyBook\Traits\HasApiAccess;
8+
use SimplyBook\Http\Entities\Service;
9+
use SimplyBook\Http\Entities\ServiceProvider;
810

911
class 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

0 commit comments

Comments
 (0)