PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/footcrew.com/public_html/wp-content/plugins/woo-alidropship/frontend/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/footcrew.com/public_html/wp-content/plugins/woo-alidropship/frontend/product.php

<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
/**
 * Class VI_WOO_ALIDROPSHIP_Frontend_Product
 */
class VI_WOO_ALIDROPSHIP_Frontend_Product {
	private $settings;

	public function __construct() {
		$this->settings = VI_WOO_ALIDROPSHIP_DATA::get_instance();
		add_action( 'woocommerce_before_variations_form', array( $this, 'ignore_ship_from' ) );
	}

	public function ignore_ship_from() {
		if ( $this->settings->get_params( 'ignore_ship_from' ) ) {
			?>
            <script type="text/javascript">
                'use strict';
                jQuery(document).ready(function ($) {
                    let $options = $('#ships-from option');
                    for (let $option of $options) {
                        let optObj = $($option);
                        optObj.val().toLowerCase() === 'china' ? optObj.prop('selected', true) : optObj.remove();
                    }
                });
            </script>
			<?php
		}
	}
}