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/takarzan.ir/wp-content/themes/xts-luman/js/scripts/woocommerceComments.js
/* global xts_settings */
(function($) {
	XTSThemeModule.xtsElementorAddAction('frontend/element_ready/xts_single_product_reviews.default', function($wrapper) {
		$wrapper.find('.wc-tabs-wrapper, .woocommerce-tabs').trigger('init');
		$wrapper.find('#rating').parent().find('> .stars').remove();
		$wrapper.find('#rating').trigger('init');
	});

	XTSThemeModule.xtsElementorAddAction('frontend/element_ready/xts_single_product_tabs.default', function($wrapper) {
		$wrapper.find('.wc-tabs-wrapper, .woocommerce-tabs').trigger('init');
		$wrapper.find('#rating').parent().find('> .stars').remove();
		$wrapper.find('#rating').trigger('init');
	});

	XTSThemeModule.woocommerceComments = function() {
		var hash = window.location.hash;
		var url = window.location.href;

		if (hash.toLowerCase().indexOf('comment-') >= 0 || hash === '#reviews' || hash === '#tab-reviews' || url.indexOf('comment-page-') > 0 || url.indexOf('cpage=') > 0 || hash === '#tab-xts_additional_tab' || hash === '#tab-xts_custom_additional_tab') {
			setTimeout(function() {
				window.scrollTo(0, 0);
			}, 1);

			setTimeout(function() {
				if ($(hash).length > 0) {
					$('.woocommerce-tabs a[href=' + hash + ']').trigger('click');
					$('html, body').stop().animate({
						scrollTop: $(hash).offset().top - 100
					}, 400);
				}
			}, 10);
		}
	};

	$(document).ready(function() {
		XTSThemeModule.woocommerceComments();
	});
})(jQuery);