403Webshell
Server IP : 62.60.133.156  /  Your IP : 216.73.217.51
Web Server : LiteSpeed
System : Linux linux24.centraldnserver.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User : mimradmin ( 1166)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /home/mimradmin/.trash/wp-content/themes/woodmart/js/scripts/wc/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/mimradmin/.trash/wp-content/themes/woodmart/js/scripts/wc/variationsPrice.js
/* global woodmart_settings */
(function($) {
	woodmartThemeModule.$document.on('wdQuickViewOpen', function () {
		woodmartThemeModule.variationsPrice();
	});

	$.each([
		'frontend/element_ready/wd_single_product_add_to_cart.default',
	], function(index, value) {
		woodmartThemeModule.wdElementorAddAction(value, function() {
			woodmartThemeModule.variationsPrice();
		});
	});

	woodmartThemeModule.variationsPrice = function() {
		if ('no' === woodmart_settings.single_product_variations_price) {
			return;
		}

		$('.variations_form').each(function() {
			var $form = $(this);
			var isQuickView = $form.parents('.product-quick-view').length;

			var getPrice = function() {
				if ( $('.wd-content-layout').hasClass('wd-builder-on') && ! isQuickView ) {
					return $form.parents('.single-product-page').find('.wd-single-price .price');
				}

				return $form.parent().find('> .price, > div > .price');
			};

			var $price = getPrice();
			var $priceOriginal = $price.clone();

			$form.on('found_variation', function(e, variation) {
				if (variation.price_html.length > 1) {
					$price.replaceWith(variation.price_html);
					$price = getPrice();
				}
			});

			$form.on('reset_data', function() {
				$price.replaceWith($priceOriginal.clone());
				$price = getPrice();
			});
		});
	};

	$(document).ready(function() {
		woodmartThemeModule.variationsPrice();
	});
})(jQuery);

Youez - 2016 - github.com/yon3zu