Skip to content
Docs
Get RestroPress

Filter

rpress_shop_state

Updated
On this page

Filters the shop base state.

Applied in rpress_get_shop_state(), which reads the base_state option and returns false when it is not set. Return a state code or name to override the stored value.

Parameters#

ParameterTypeDescription
$statestring|falseThe base state value from the base_state option, or false if not set.

Return value#

string|false. The state to use as the shop base state.

Example#

function my_shop_state( $state ) {
	return $state ? $state : 'CA';
}
add_filter( 'rpress_shop_state', 'my_shop_state' );

Source#

Applied in:

  • includes/country-functions.php (line 31), in rpress_get_shop_state()

See also#

Was this page helpful?