HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/lacalita/wp-content/plugins/rey-core/inc/modules/scheduled-sales/pdp.php
<?php
namespace ReyCore\Modules\ScheduledSales;

if (!defined('ABSPATH')) exit; // Exit if accessed directly

class Pdp
{

	public $type;

	public function __construct()
	{

		if( ! ($this->type = Base::instance()->data['pdp']['type']) ){
			return;
		}

		add_action('woocommerce_before_single_product', [$this, 'add']);
	}

	function add(){

		$instance = Base::instance();

		$position = $instance->data['pdp']['position'];

		$hooks = [
			'before_title' => [
				'hook'     => 'woocommerce_single_product_summary',
				'priority' => 4,
			],
			'after_price' => [
				'hook'     => 'woocommerce_single_product_summary',
				'priority' => 11,
			],
			'before_meta' => [
				'hook'     => 'reycore/woocommerce_product_meta/before',
				'priority' => 5,
			],
			'after_meta' => [
				'hook'     => 'reycore/woocommerce_product_meta/after',
				'priority' => 10,
			],
		];

		if( ! isset($hooks[ $position ]) ){
			return;
		}

		add_action($hooks[ $position ]['hook'], [ $instance, 'render' ], $hooks[ $position ]['priority']);

	}

}