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/compatibility/facetwp/base.php
<?php
namespace ReyCore\Compatibility\FacetWP;

if ( ! defined( 'ABSPATH' ) ) exit;

class Base extends \ReyCore\Compatibility\CompatibilityBase {

	public function __construct() {
		add_action('wp_footer', [$this, 'scripts'], 20);
	}

	public function scripts() {
		?><script type="text/javascript">
			document.addEventListener('facetwp-loaded', function() {

				// gather a selectors list
				var gridSelectors = [
					'.rey-siteMain ul.products',
					'.facetwp-template.elementor-widget-loop-grid ul.products',
					'.facetwp-template.elementor-widget-woocommerce-products ul.products',
				];

				// find the product grid
				document.querySelectorAll(gridSelectors.join(',')).forEach(grid => {
					if( rey ){
						rey.hooks.doAction('product/loaded', grid.querySelectorAll('li.product') );
					}
				});

			});
		</script><?php
	}

}