Forum Replies Created

Viewing 11 replies - 361 through 371 (of 371 total)
  • Plugin Author Condless

    (@condless)

    ?????? ???? ??? ????? ??? ?????? ?? ????? ?????? ??????? ????? ????? ??? ?? ????? ????:

    add_filter( 'woocommerce_states', 'csz_checkout_restrict_woocommerce_states', 60 );
    function csz_checkout_restrict_woocommerce_states( $states ) {
    	if ( is_checkout() ) {
    		$new_states = array();
    		for ( $i = 0; $i < 100; $i++ ) {
    			$zone = WC_Shipping_Zones::get_zone( $i );
    			if ( $zone ) {
    				foreach ( $zone->get_zone_locations() as $zone_location ) {
    					switch ( $zone_location->type ) {
    						case 'country':
    							$new_states[ $zone_location->code ] = $states[ $zone_location->code ];
    							break;
    						case 'state':
    							$country  = substr( $zone_location->code, 0, 2 );
    							$city = substr( $zone_location->code, 3 );
    							$new_states[ $country ][ $city ] = $states[ $country ][ $city ];
    							break;
    					}
    				}
    			}
    		}
    		$states = $new_states;
    	}
    	return $states;
    }

    (example of how to display in the checkout only the cities configured in the Shipping Zones Settings)

    Plugin Author Condless

    (@condless)

    ??? ??? ???,
    ????? ????? “????? 2” ??? ???? ????? ?? ?? ??? ??????? ??? ?? ?? ????? ?????? ???? ?? ?????? ????? ????? ??????, ?? ?? ??????? ??? ?????? ??????? ????? ????? “????? 1” ?????? ????? ????? ??.
    ????? ????? “????? 1” ???? ?????? ???? ??? ?? ??? ?????? ?? ?? 200 ??????? ??? ???, ?? ????? ?? ????? ????? ?? ???? ?????? (????? ????? 2) ??? ????? ??????? ????? (????? ‘?????’, ‘???????’ ?’????’), ?? ???? ???? ?????? ?????
    functions.php
    ??????? ?????? ???? ??????.

    add_action( 'admin_head', 'csz_add_shipping_zone_locations' );
    function csz_add_shipping_zone_locations() {
    	$zone_id = 2;
    	$cities_names = array( '?????', '???????', '????' );
    	$cities_codes = array();
    	$all_cities = array();
    	foreach ( WC()->countries->get_states( 'IL' ) as $city_code => $city_name) {
    		$all_cities[ $city_code ] = __( $city_name );
    	}
    	foreach ( $cities_names as $city ) {
    		$city_code = array_search( $city, $all_cities );
    		if ( isset( $city_code ) ) {
    			array_push( $cities_codes, array( 'code' => 'IL:' . $city_code, 'type' => 'state' ) );
    		}
    	}
    	$zone = WC_Shipping_Zones::get_zone( $zone_id );
    	$zone->set_locations( $cities_codes );
    	$zone->save();
    }

    (example of how to set the locations for specific shipping zone programmatically)

    Plugin Author Condless

    (@condless)

    Hi Krystof, Thanks for reporting!
    Please update to the latest version of the plugin and see if the warning is still present.

    Plugin Author Condless

    (@condless)

    ???, ???? ?????????
    ace_js_force_shipping_address
    ????? ????? ?????? ?????? ????? ??????? ??? ???? ?????? ?? ????? (??? ???? ??????? ????) ????? ??? ???? ?????? ?? ??????, ????? ????? ????? ???? ????? ??????

    ?”?
    ?? ????? ??? ????? ?? ???? ?????? ?? ??? ??? ??? ?????? ???? ?? ?????? ??????? “???? ????? ?????? ?????” ?????? ???? ???? => ??????? => ?????? => ????? => ???????? ?????

    Plugin Author Condless

    (@condless)

    ??? ??? ??? ???,
    ???????????? ?? ????? ?????? ??? ??? ????? ????? ?????? ?”? ???? ?????????? ?? ??? ?????, ?? ?? ???? ????? ?? ????? ?????.
    ??? ????? ?????, ???? ????? ??????? ??? ??? ??? ?? ??????, ?????? ?? ?????? ????? ?? ?? ??????? ???? ???????? ???? ???????, ??????? ?????? ?? ????? ?????? ??? ??????? ?????.
    ????? ??? ?? ????? ?????? ????? ????? ?? ???? ????? ????? ???

    Plugin Author Condless

    (@condless)

    ?? ????? ????, ?????? ??? ????? ??? ?????? ?? ?? ????? ??????? ?????? ?????, ?? ????? ??????? ????? ????? ?? ????? ????? ???? ?????, ???? ???? ???? ??? ?? ????? ???? ????? ???? ????? ??? ????? ???????.

    ?????? ????? ???? ????? ????? ?? ????? ??????? ?????? ?????? ????? ????, ?? ??? ?????? ?? ?????.

    Plugin Author Condless

    (@condless)

    ???, ???? ?? ??????.
    ????? ????? ????? ????? ????-
    ?????? ???? ????? ?? ????? ??????? ?????? ????? ?? ????? ???? ?????? ????,
    ????? ????? ???? ?? ?? ????? ?? ???? ????? ?? ????? ????,
    ?? ?????? ????? ???????? ????? ??????? ????? ?? ?????? ?????? ????.

    ?????? ????? ?????? ?????? ?? ????? ???? ???? ???? ????? ???’? ???? ???? ????? ?????? ????.

    Plugin Author Condless

    (@condless)

    ??? ????,
    ???? ?? ????? ??? ?????? ???? ???? ???? ????? ??? ??????, ???? ???? ????? ?? ?? ???????, ??? ???, ???? ??? ????, ?????? ?????? ??? ?????
    functions.php:

    add_filter( 'woocommerce_states', 'csz_set_woocommerce_states', 20 );
    function csz_set_woocommerce_states( $states ) {
    	$country = 'IL';
    	$cities = array( 'IL3000', 'IL4000', 'IL5000', 'IL9000' );
    	$new_states = array();
    	foreach ( $cities as $city ) {
    		if ( isset( $states[ $country ][ $city ] ) ) {
    			$new_states[ $city ] = $states[ $country ][ $city ];
    		}
    	}
    	$states[ $country ] = $new_states;
    	return $states;
    }

    $cities
    ???? ?? ?????? ?? ????? ??????, ????? ?????? ?? ?? ????? ?????? ????? ??????? ????? ?????:
    /i18n/cities/IL.php

    (example of how to manipluate existing cities list)

    • This reply was modified 4 years, 6 months ago by Condless.

    It might be helpful to add to wp-config.php the following line:
    $_SERVER['HTTPS'] = 'on';
    Just before the line:
    require_once(ABSPATH . 'wp-settings.php');

    • This reply was modified 4 years, 10 months ago by Condless.

    The issue may be resolved by using the following code in Storefront child theme functions.php file:

    <?php
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles', 9999 );
    function my_theme_enqueue_styles() {
    	if ( is_rtl() ){
    		$parent_style = 'storefront-style';
    		wp_dequeue_style( 'storefront-child-style' );
    		wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style-rtl.css', array( $parent_style), get_the_time() );
    	}
    }

    Better results may be obtained by adding the following code to the functions.php file in the child theme:

    add_action('admin_head', 'my_custom_fonts');
    function my_custom_fonts() {echo '<style>.chosen-container .chosen-drop {left: 9999px;}</style>';}
Viewing 11 replies - 361 through 371 (of 371 total)