• Resolved opicron

    (@opicron)


    Hi I have disabled the state field in woocommerce. It seems that your plugin depends on the index being set. Please see below notices:

    Undefined index: shipping_state 1 wp-content/plugins/woo-address-book/woocommerce-address-book.php:558
    Undefined index: shipping_state 1 wp-content/plugins/woo-address-book/woocommerce-address-book.php:569

    Could you please take a look at these? Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Gary Thayer

    (@doomwaxer)

    Thanks for the report! I’ve wrapped these field look ups with isset(). I’ll have this update live tonight or tomorrow.

    Thread Starter opicron

    (@opicron)

    Hi there, thank you for the update! However, im still getting the undefined index errors. I disabled the state using the following code:

    
    add_filter( 'woocommerce_shipping_fields', 'wc_filter_shipping_fields', 10, 1 );
    function wc_filter_shipping_fields( $address_fields ) {
        unset($address_fields['shipping_state']);
        return $address_fields;
    }
    
    Plugin Contributor Gary Thayer

    (@doomwaxer)

    Did you download a version from GitHub to test this? I’ve not pushed this update to the WordPress repo yet.

    Thread Starter opicron

    (@opicron)

    My bad, I saw update 1.3.4 yesterday and assumed it was the right one. Should have known after reading the update notes.

    Plugin Contributor Gary Thayer

    (@doomwaxer)

    Hi, Thanks for your patience. I just put out 1.3.5 which should help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Undefined index when disabling state in woocommerce’ is closed to new replies.