Search
 
SCRIPT & CODE EXAMPLE
 

PHP

remove some state from state list woocommerce

add_filter( 'woocommerce_states', 'custom_us_states', 10, 1 );
function custom_us_states( $states ) {
    $non_allowed_us_states = array( 'AK', 'HI', 'AA', 'AE', 'AP'); 

    // Loop through your non allowed us states and remove them
    foreach( $non_allowed_us_states as $state_code ) {
        if( isset($states['US'][$state_code]) )
            unset( $states['US'][$state_code] );
    }
    return $states;
}
Comment

PREVIOUS NEXT
Code Example
Php :: public variable in php 
Php :: php file date created older than 
Php :: no cache hummingbird 
Php :: post is empty php api 
Php :: laravel migration drop foreign keys 
Php :: like query with prepare wordpress 
Php :: turn off wordpress user list exposed 
Php :: php pdo get id selected by href 
Php :: static function php 
Php :: how to back the page laravel where the scorll is 
Php :: delete all rows in table laravel foreign key 
Php :: Laravel Retrieving & Deleting An Item from session 
Php :: wordpress change email new user template 
Php :: reindex after post api magento 2 
Php :: Get the current script file name 
Php :: laravel withwhere 
Php :: text to sha256 converter in laravel 
Php :: blade Keep input values after failed validation 
Php :: string put inside tag string php 
Php :: simple bindings laravel 
Php :: hasmany relationship in laravel 
Php :: php test questions 
Php :: pass the product name to form field cf7 woocommerce 
Php :: laravel id generator 
Php :: how to integrate google reCAPTCHA in codeigniter? 
Php :: return response at failedValidation() in request laravel 
Php :: download image from mysql using php 
Php :: manual collection laravel 
Php :: php laravel string substring 
Php :: Declare A PHP Array 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =