HEX
Server: LiteSpeed
System: Linux server902.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: deshuvsd (2181)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/deshuvsd/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();
	}
}