HEX
Server: LiteSpeed
System: Linux linux31.centraldnserver.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: salamatk (1501)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open
Upload Files
File: /home/salamatk/.trash/woodmart1/inc/integrations/wcpay.php
<?php
/**
 * WooPayments
 *
 * @package woodmart
 */

use WCPay\MultiCurrency\MultiCurrency;

if ( ! defined( 'WCPAY_VERSION_NUMBER' ) ) {
	return;
}

if ( ! function_exists( 'woodmart_wcpay_convert_price_limit' ) ) {
	/**
	 * Converse shipping progress bar limit.
	 *
	 * @param float $limit
	 * @return float
	 */
	function woodmart_wcpay_convert_price_limit( $limit ) {
		if ( 'wc' === woodmart_get_opt( 'shipping_progress_bar_calculation', 'custom' ) ) {
			return $limit;
		}

		$limit *= MultiCurrency::instance()->get_selected_currency()->get_rate();

		return $limit;
	}

	add_action( 'woodmart_shipping_progress_bar_amount', 'woodmart_wcpay_convert_price_limit' );
}