HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/CouponNotificationJob.php.tar
httpdocs/wp-content/plugins/google-listings-and-ads/src/Jobs/Notifications/CouponNotificationJob.php000064400000003606151553613050036312 0ustar00var/www/vhosts/uyarreklam.com.tr<?php
declare(strict_types=1);

namespace Automattic\WooCommerce\GoogleListingsAndAds\Jobs\Notifications;

use Automattic\WooCommerce\GoogleListingsAndAds\ActionScheduler\ActionSchedulerInterface;
use Automattic\WooCommerce\GoogleListingsAndAds\API\WP\NotificationsService;
use Automattic\WooCommerce\GoogleListingsAndAds\Coupon\CouponHelper;
use Automattic\WooCommerce\GoogleListingsAndAds\Jobs\ActionSchedulerJobMonitor;
use Automattic\WooCommerce\GoogleListingsAndAds\Jobs\Notifications\HelperNotificationInterface;

defined( 'ABSPATH' ) || exit;

/**
 * Class CouponNotificationJob
 * Class for the Coupons Notifications Jobs
 *
 * @since 2.8.0
 * @package Automattic\WooCommerce\GoogleListingsAndAds\Jobs\Notifications
 */
class CouponNotificationJob extends AbstractItemNotificationJob {

	/**
	 * @var CouponHelper $helper
	 */
	protected $helper;

	/**
	 * Notifications Jobs constructor.
	 *
	 * @param ActionSchedulerInterface    $action_scheduler
	 * @param ActionSchedulerJobMonitor   $monitor
	 * @param NotificationsService        $notifications_service
	 * @param HelperNotificationInterface $coupon_helper
	 */
	public function __construct(
		ActionSchedulerInterface $action_scheduler,
		ActionSchedulerJobMonitor $monitor,
		NotificationsService $notifications_service,
		HelperNotificationInterface $coupon_helper
	) {
		$this->helper = $coupon_helper;
		parent::__construct( $action_scheduler, $monitor, $notifications_service );
	}

	/**
	 * Get the coupon
	 *
	 * @param int $item_id
	 * @return \WC_Coupon
	 */
	protected function get_item( int $item_id ) {
		return $this->helper->get_wc_coupon( $item_id );
	}

	/**
	 * Get the Coupon Helper
	 *
	 * @return HelperNotificationInterface
	 */
	public function get_helper(): HelperNotificationInterface {
		return $this->helper;
	}

	/**
	 * Get the job name
	 *
	 * @return string
	 */
	public function get_job_name(): string {
		return 'coupons';
	}
}