✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.138
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/tdhomesa/public_html/wp-content/plugins/woocommerce/src/Internal/Admin//Events.php
<?php
/**
 * Handle cron events.
 */

namespace Automattic\WooCommerce\Internal\Admin;

defined( 'ABSPATH' ) || exit;

use Automattic\WooCommerce\Admin\Features\Features;
use Automattic\WooCommerce\Admin\RemoteInboxNotifications\RemoteInboxNotificationsEngine;
use Automattic\WooCommerce\Internal\Admin\Notes\CustomizeStoreWithBlocks;
use Automattic\WooCommerce\Internal\Admin\Notes\CustomizingProductCatalog;
use Automattic\WooCommerce\Internal\Admin\Notes\EditProductsOnTheMove;
use Automattic\WooCommerce\Internal\Admin\Notes\EmailImprovements;
use Automattic\WooCommerce\Internal\Admin\Notes\EUVATNumber;
use Automattic\WooCommerce\Internal\Admin\Notes\FirstProduct;
use Automattic\WooCommerce\Internal\Admin\Notes\InstallJPAndWCSPlugins;
use Automattic\WooCommerce\Internal\Admin\Notes\LaunchChecklist;
use Automattic\WooCommerce\Internal\Admin\Notes\MagentoMigration;
use Automattic\WooCommerce\Internal\Admin\Notes\ManageOrdersOnTheGo;
use Automattic\WooCommerce\Internal\Admin\Notes\MarketingJetpack;
use Automattic\WooCommerce\Internal\Admin\Notes\MigrateFromShopify;
use Automattic\WooCommerce\Internal\Admin\Notes\MobileApp;
use Automattic\WooCommerce\Internal\Admin\Notes\NewSalesRecord;
use Automattic\WooCommerce\Internal\Admin\Notes\OnboardingPayments;
use Automattic\WooCommerce\Internal\Admin\Notes\OnlineClothingStore;
use Automattic\WooCommerce\Internal\Admin\Notes\OrderMilestones;
use Automattic\WooCommerce\Internal\Admin\Notes\PaymentsMoreInfoNeeded;
use Automattic\WooCommerce\Internal\Admin\Notes\PaymentsRemindMeLater;
use Automattic\WooCommerce\Internal\Admin\Notes\PerformanceOnMobile;
use Automattic\WooCommerce\Internal\Admin\Notes\PersonalizeStore;
use Automattic\WooCommerce\Internal\Admin\Notes\RealTimeOrderAlerts;
use Automattic\WooCommerce\Internal\Admin\Notes\ScheduledUpdatesPromotion;
use Automattic\WooCommerce\Internal\Admin\Notes\SellingOnlineCourses;
use Automattic\WooCommerce\Internal\Admin\Notes\TrackingOptIn;
use Automattic\WooCommerce\Internal\Admin\Notes\UnsecuredReportFiles;
use Automattic\WooCommerce\Internal\Admin\Notes\WooCommercePayments;
use Automattic\WooCommerce\Internal\Admin\Notes\WooCommerceSubscriptions;
use Automattic\WooCommerce\Internal\Admin\Notes\WooSubscriptionsNotes;
use Automattic\WooCommerce\Internal\Admin\Schedulers\MailchimpScheduler;
use Automattic\WooCommerce\Admin\Notes\Note;
use Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions\PaymentGatewaySuggestionsDataSourcePoller;
use Automattic\WooCommerce\Internal\Admin\RemoteFreeExtensions\RemoteFreeExtensionsDataSourcePoller;

/**
 * Events Class.
 */
class Events {
	/**
	 * The single instance of the class.
	 *
	 * @var object
	 */
	protected static $instance = null;

	/**
	 * Constructor
	 *
	 * @return void
	 */
	protected function __construct() {}

	/**
	 * Array of note class to be added or updated.
	 *
	 * @var array
	 */
	private static $note_classes_to_added_or_updated = array(
		CustomizeStoreWithBlocks::class,
		CustomizingProductCatalog::class,
		EditProductsOnTheMove::class,
		EmailImprovements::class,
		EUVATNumber::class,
		FirstProduct::class,
		LaunchChecklist::class,
		MagentoMigration::class,
		ManageOrdersOnTheGo::class,
		MarketingJetpack::class,
		MigrateFromShopify::class,
		MobileApp::class,
		NewSalesRecord::class,
		OnboardingPayments::class,
		OnlineClothingStore::class,
		PaymentsMoreInfoNeeded::class,
		PaymentsRemindMeLater::class,
		PerformanceOnMobile::class,
		PersonalizeStore::class,
		RealTimeOrderAlerts::class,
		ScheduledUpdatesPromotion::class,
		TrackingOptIn::class,
		WooCommercePayments::class,
		WooCommerceSubscriptions::class,
	);

	/**
	 * The other note classes that are added in other places.
	 *
	 * @var array
	 */
	private static $other_note_classes = array(
		InstallJPAndWCSPlugins::class,
		OrderMilestones::class,
		SellingOnlineCourses::class,
		UnsecuredReportFiles::class,
		WooSubscriptionsNotes::class,
	);


	/**
	 * Get class instance.
	 *
	 * @return object Instance.
	 */
	final public static function instance() {
		if ( null === static::$instance ) {
			static::$instance = new static();
		}
		return static::$instance;
	}

	/**
	 * Cron event handlers.
	 */
	public function init() {
		add_action( 'wc_admin_daily', array( $this, 'do_wc_admin_daily' ) );
		add_filter( 'woocommerce_get_note_from_db', array( $this, 'get_note_from_db' ), 10, 1 );

		// Initialize the WC_Notes_Refund_Returns Note to attach hook.
		\WC_Notes_Refund_Returns::init();
	}

	/**
	 * Daily events to run.
	 *
	 * Note: Order_Milestones::possibly_add_note is hooked to this as well.
	 */
	public function do_wc_admin_daily() {
		$this->possibly_add_notes();
		$this->possibly_delete_notes();
		$this->possibly_update_notes();
		$this->possibly_refresh_data_source_pollers();

		if ( $this->is_remote_inbox_notifications_enabled() ) {
			RemoteInboxNotificationsEngine::run();
		}

		if ( Features::is_enabled( 'core-profiler' ) ) {
			( new MailchimpScheduler() )->run();
		}
	}

	/**
	 * Get note.
	 *
	 * @param Note $note_from_db The note object from the database.
	 */
	public function get_note_from_db( $note_from_db ) {
		if ( ! $note_from_db instanceof Note || get_user_locale() === $note_from_db->get_locale() ) {
			return $note_from_db;
		}

		$note_classes = array_merge( self::$note_classes_to_added_or_updated, self::$other_note_classes );
		foreach ( $note_classes as $note_class ) {
			if ( defined( "$note_class::NOTE_NAME" ) && $note_class::NOTE_NAME === $note_from_db->get_name() ) {
				$note_from_class = method_exists( $note_class, 'get_note' ) ? $note_class::get_note() : null;

				if ( $note_from_class instanceof Note ) {
					$note = clone $note_from_db;
					$note->set_title( $note_from_class->get_title() );
					$note->set_content( $note_from_class->get_content() );
					$actions = $note_from_class->get_actions();
					foreach ( $actions as $action ) {
						$matching_action = $note->get_action( $action->name );
						if ( $matching_action && $matching_action->id ) {
							$action->id = $matching_action->id;
						}
					}
					$note->set_actions( $actions );
					return $note;
				}
				break;
			}
		}
		return $note_from_db;
	}

	/**
	 * Adds notes that should be added.
	 */
	protected function possibly_add_notes() {
		foreach ( self::$note_classes_to_added_or_updated as $note_class ) {
			if ( method_exists( $note_class, 'possibly_add_note' ) ) {
				$note_class::possibly_add_note();
			}
		}
	}

	/**
	 * Deletes notes that should be deleted.
	 */
	protected function possibly_delete_notes() {
		PaymentsRemindMeLater::delete_if_not_applicable();
		PaymentsMoreInfoNeeded::delete_if_not_applicable();
	}

	/**
	 * Updates notes that should be updated.
	 */
	protected function possibly_update_notes() {
		foreach ( self::$note_classes_to_added_or_updated as $note_class ) {
			if ( method_exists( $note_class, 'possibly_update_note' ) ) {
				$note_class::possibly_update_note();
			}
		}
	}

	/**
	 * Checks if remote inbox notifications are enabled.
	 *
	 * @return bool Whether remote inbox notifications are enabled.
	 */
	protected function is_remote_inbox_notifications_enabled() {
		// Check if the feature flag is disabled.
		if ( ! Features::is_enabled( 'remote-inbox-notifications' ) ) {
			return false;
		}

		// Check if the site has opted out of marketplace suggestions.
		if ( get_option( 'woocommerce_show_marketplace_suggestions', 'yes' ) !== 'yes' ) {
			return false;
		}

		// All checks have passed.
		return true;
	}

	/**
	 * Checks if merchant email notifications are enabled.
	 *
	 * @return bool Whether merchant email notifications are enabled.
	 */
	protected function is_merchant_email_notifications_enabled() {
		// Check if the feature flag is disabled.
		if ( get_option( 'woocommerce_merchant_email_notifications', 'no' ) !== 'yes' ) {
			return false;
		}

		// All checks have passed.
		return true;
	}

	/**
	 *   Prime or fetch specs for the following DataSourcePollers on the wc_admin_daily cron job
	 *   when their related transients are missing or expired:
	 *   - PaymentGatewaySuggestionsDataSourcePoller
	 *   - RemoteFreeExtensionsDataSourcePoller
	 */
	protected function possibly_refresh_data_source_pollers() {
		$completed_tasks = get_option( 'woocommerce_task_list_tracked_completed_tasks', array() );

		if ( ! in_array( 'payments', $completed_tasks, true ) && ! in_array( 'woocommerce-payments', $completed_tasks, true ) ) {
			PaymentGatewaySuggestionsDataSourcePoller::get_instance()->get_specs_from_data_sources();
		}

		if ( ! in_array( 'store_details', $completed_tasks, true ) && ! in_array( 'marketing', $completed_tasks, true ) ) {
			RemoteFreeExtensionsDataSourcePoller::get_instance()->get_specs_from_data_sources();
		}
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Agentic
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
BlockTemplates
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
EmailImprovements
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
EmailPreview
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Emails
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
ImportExport
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Logging
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Marketing
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Notes
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Onboarding
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Orders
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
ProductForm
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
ProductReviews
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
RemoteFreeExtensions
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Schedulers
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Settings
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
Suggestions
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
WCPayPromotion
--
28 May 2026 10.38 AM
tdhomesa / tdhomesa
0755
ActivityPanels.php
1.578 KB
24 Aug 2022 2.07 AM
tdhomesa / tdhomesa
0644
Analytics.php
11.784 KB
19 Jan 2026 2.46 PM
tdhomesa / tdhomesa
0644
CategoryLookup.php
7.988 KB
20 Apr 2022 6.50 AM
tdhomesa / tdhomesa
0644
Coupons.php
2.859 KB
14 Nov 2024 1.17 AM
tdhomesa / tdhomesa
0644
CouponsMovedTrait.php
2.412 KB
19 Jan 2026 2.46 PM
tdhomesa / tdhomesa
0644
CustomerEffortScoreTracks.php
17.652 KB
24 Nov 2025 11.10 PM
tdhomesa / tdhomesa
0644
Events.php
8.538 KB
5 May 2026 2.26 PM
tdhomesa / tdhomesa
0644
FeaturePlugin.php
6.766 KB
23 Feb 2026 5.58 PM
tdhomesa / tdhomesa
0644
Homescreen.php
8.697 KB
11 May 2026 5.17 PM
tdhomesa / tdhomesa
0644
Loader.php
19.183 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
Marketing.php
6.289 KB
14 Nov 2024 1.17 AM
tdhomesa / tdhomesa
0644
Marketplace.php
3.478 KB
19 Jan 2026 2.46 PM
tdhomesa / tdhomesa
0644
MobileAppBanner.php
0.934 KB
20 Apr 2022 6.50 AM
tdhomesa / tdhomesa
0644
RemoteInboxNotifications.php
0.91 KB
21 Mar 2023 8.45 PM
tdhomesa / tdhomesa
0644
Settings.php
14.613 KB
5 May 2026 2.26 PM
tdhomesa / tdhomesa
0644
ShippingLabelBanner.php
4.667 KB
23 Sep 2024 8.44 PM
tdhomesa / tdhomesa
0644
ShippingLabelBannerDisplayRules.php
3.631 KB
4 Sep 2024 8.34 PM
tdhomesa / tdhomesa
0644
SiteHealth.php
2.314 KB
22 Feb 2023 7.17 AM
tdhomesa / tdhomesa
0644
Survey.php
0.75 KB
20 Apr 2022 6.50 AM
tdhomesa / tdhomesa
0644
SystemStatusReport.php
5.85 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
Translations.php
11.662 KB
14 Nov 2024 1.17 AM
tdhomesa / tdhomesa
0644
WCAdminAssets.php
17.744 KB
5 May 2026 2.26 PM
tdhomesa / tdhomesa
0644
WCAdminSharedSettings.php
2.078 KB
22 Apr 2025 3.40 PM
tdhomesa / tdhomesa
0644
WCAdminUser.php
5.264 KB
6 Oct 2025 5.56 PM
tdhomesa / tdhomesa
0644
WcPayWelcomePage.php
6.329 KB
23 Jun 2025 7.46 PM
tdhomesa / tdhomesa
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF