HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/shoetique/wp-content/plugins/wpae-woocommerce-add-on/static/js/admin.js
/**
 * plugin admin area javascript
 */
(function($){$(function () {
	
	if ( ! $('body.wpallimport-plugin').length) return; // do not execute any code if we are not on plugin page
	
	// [ WC Customers View ]
	// swither show/hide logic
	$('select.switcher').live('change', function (e) {	

		var $targets = $('.switcher-target-' + $(this).attr('id'));

		var is_show = $(this).val() == 'xpath'; if ($(this).is('.switcher-reversed')) is_show = ! is_show;
		if (is_show) {
			$targets.slideDown();
		} else {
			$targets.slideUp().find('.clear-on-switch').add($targets.filter('.clear-on-switch')).val('');
		}

	}).change();

	$('.existing_umeta_keys').change(function(){

		var parent_fieldset = $(this).parents('fieldset').first();
		var key = $(this).find('option:selected').val();
		
		if ("" != $(this).val()) {

			parent_fieldset.find('input[name^=custom_name]:visible').each(function(){
				if ("" == $(this).val()) $(this).parents('tr').first().remove();
			});
			parent_fieldset.find('a.add-new-custom').click();
			parent_fieldset.find('input[name^=custom_name]:visible').last().val($(this).val());

			$(this).prop('selectedIndex',0);	

			parent_fieldset.addClass('loading');		

			var request = {
				action:'get_umeta_values',		
				security: wp_all_import_security,		
				key: key
		    };
		    
			$.ajax({
				type: 'POST',
				url: ajaxurl,
				data: request,
				success: function(response) {
					parent_fieldset.find('input[name^=custom_name]:visible:last').after(response.html);
					parent_fieldset.removeClass('loading');			
				},
				dataType: "json"
			});
					
		}

	});

	$('.existing_umeta_values').live('change', function(){
		var parent_fieldset = $(this).parents('.form-field:first');
		if ($(this).val() != ""){
			parent_fieldset.find('textarea').val($(this).val());
			$(this).prop('selectedIndex', 0);
		}
	});

});})(jQuery);