HEX
Server: Apache
System: Linux 4801f1b1.ptr.provps.com 6.17.8-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 13 18:02:25 EST 2025 x86_64
User: nassaugo (1004)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/nassaugo/www/wp-content/plugins/cartflows-pro/classes/class-cartflows-pro-wc-common.php
<?php
/**
 * WC Common.
 *
 * @package CARTFLOWS
 */

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

/**
 * Class Cartflows_Pro_Wc_Common.
 */
class Cartflows_Pro_Wc_Common {

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

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


	/**
	 * Get Currency
	 *
	 * @param obj $order Order.
	 * @return string
	 */
	public function get_currency( $order ) {

		return $order ? $order->get_currency() : get_woocommerce_currency();
	}

	/**
	 * Get Order ID
	 *
	 * @param obj $order Order.
	 * @return string
	 */
	public function get_order_id( $order ) {

		return $order->get_id();
	}
}