woocommerce_states

woocommerce_states

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_states') is found 2 times:

  • /includes/class-wc-countries.php line 194
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
         * @since 1.5.3
         *
         * @param array $states
         */
        $this->geo_cache['states'] = apply_filters( 'woocommerce_states', $states );
    }
     
    /**
     * Get the states for a country.
     *
     * @param  string $cc Country code.
  • /includes/class-wc-countries.php line 212
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
         * @since 1.5.3
         *
         * @param array $states
         */
        $this->geo_cache['states'] = apply_filters( 'woocommerce_states', include WC()->plugin_path() . '/i18n/states.php' );
    }
     
    if ( ! is_null( $cc ) ) {
        return isset( $this->geo_cache['states'][ $cc ] ) ? $this->geo_cache['states'][ $cc ] : false;
    } else {
        return $this->geo_cache['states'];