Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

na - adding is ending soon to woo email page #905

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions client-mu-plugins/goodbids/src/classes/Auctions/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,14 @@ private function schedule_auction_ending_soon_check(): void {
add_action(
'init',
function (): void {
if (wp_next_scheduled(Auctions::CRON_AUCTION_ENDING_SOON_CHECK_HOOK)){
return;
if (false === wp_next_scheduled(Auctions::CRON_AUCTION_ENDING_SOON_CHECK_HOOK)){
// Event is not scheduled, so schedule it.
wp_schedule_event(
strtotime( current_time( 'mysql') ),
$this->cron_intervals['1hr']['name'],
Auctions::CRON_AUCTION_ENDING_SOON_CHECK_HOOK
);
}
wp_schedule_event(
strtotime( current_time( 'mysql') ),
$this->cron_intervals['1hr']['name'],
Auctions::CRON_AUCTION_ENDING_SOON_CHECK_HOOK
);
}
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use GoodBids\Plugins\WooCommerce\Emails\AuctionClosed;
use GoodBids\Plugins\WooCommerce\Emails\AuctionFreeBidUsed;
use GoodBids\Plugins\WooCommerce\Emails\AuctionIsEndingSoon;
use GoodBids\Plugins\WooCommerce\Emails\AuctionIsLive;
use GoodBids\Plugins\WooCommerce\Emails\AuctionIsLiveAdmin;
use GoodBids\Plugins\WooCommerce\Emails\AuctionOutbid;
Expand Down Expand Up @@ -105,6 +106,7 @@ public function load_email_classes(): void {
$this->email_classes = [
'AuctionClosed' => new AuctionClosed(),
'AuctionFreeBidUsed' => new AuctionFreeBidUsed(),
'AuctionIsEndingSoon' => new AuctionIsEndingSoon(),
'AuctionIsLive' => new AuctionIsLive(),
'AuctionIsLiveAdmin' => new AuctionIsLiveAdmin(),
'AuctionOutbid' => new AuctionOutbid(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Auction is Ending Soon: Email the Watchers when an Auction is 1 hour from closing.
* Auction is Ending Soon: Email the Watchers when an Auction is close to closing.
*
* @since 1.0.0
* @package GoodBids
Expand Down