Skip to content

Commit

Permalink
Merge pull request #20 from ghermans/main
Browse files Browse the repository at this point in the history
  • Loading branch information
ghermans authored Oct 20, 2021
2 parents 7c94dbd + a32b8d3 commit 894af25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Providers/StockNotifyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ public function boot()
]);

$this->app->booted(function () {
$schedule = $this->app->make(Schedule::class);

if (core()->getConfigData('catalog.inventory.notifications.status')) {
$schedule = $this->app->make(Schedule::class);

if (core()->getConfigData('catalog.inventory.notifications.schedule') == "hourly") {
$schedule->command(SendOutOfStockNotifcation::class)->hourly()->runInBackground();
}
Expand Down

0 comments on commit 894af25

Please sign in to comment.