wc_price_based_country_settings

Get settings array.

Description

(array) apply_filters( 'wc_price_based_country_settings', (array) $array ); 

Returns (array)

Parameters (1)

0. $array — Optional. (array) => array( array( 'title' => __( 'General Options', 'woocommerce' ), 'type' => 'title', 'desc' => '', 'id' => 'general_options' ),array( 'title' => __( 'Price Based On', 'wc-price-based-country' ), 'desc' => __( 'This controls which address is used to refresh products prices on checkout.' ), 'id' => 'wc_price_based_country_based_on', 'default' => 'billing', 'type' => 'select', 'class' => 'wc-enhanced-select', 'desc_tip' => true, 'options' => array( 'billing' => __( 'Customer billing country', 'wc-price-based-country' ), 'shipping' => __( 'Customer shipping country', 'wc-price-based-country' ) ) ), array( 'title' => __( 'Shipping', 'wc-price-based-country' ), 'desc' => __( 'Enabled currency conversion to "Flat Rate" And "International Flat Rate"', 'wc-price-based-country' ), 'id' => 'wc_price_based_shipping_conversion', 'default' => 'no', 'type' => 'checkbox' ),array( 'type' => 'sectionend', 'id' => 'general_options' ),array( 'title' => __( 'Test Mode', 'wc-price-based-country' ), 'type' => 'title', 'desc' => 'If you want to check that prices are shown successfully, enable test mode and enter the Country which you want to do the test.', 'id' => 'price_based_country_test' ),array( 'title' => __( 'Enabled/Disabled', 'wc-price-based-country' ), 'desc' => __( 'Enabled Test Mode', 'wc-price-based-country' ), 'id' => 'wc_price_based_country_test_mode', 'default' => 'no', 'type' => 'checkbox', 'desc_tip' => __('If test mode is enabled, a demo store notice will be displayed .') ),array( 'title' => __( 'Test country', 'wc-price-based-country' ), 'id' => 'wc_price_based_country_test_country', 'default' => wc_get_base_location(), 'type' => 'select', 'class' => 'chosen_select', 'options' => WC()->countries->countries ), array( 'type' => 'sectionend', 'id' => 'price_based_country_test' ) )
The array.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'wc_price_based_country_settings', $array ); 
  2.  
  3. if ( !empty( $array ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wc_price_based_country_settings callback 
  2. function filter_wc_price_based_country_settings( $array ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wc_price_based_country_settings', 'filter_wc_price_based_country_settings', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wc_price_based_country_settings', 'filter_wc_price_based_country_settings', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/admin/settings/class-wc-settings-price-based-country.php  
  1. $settings = apply_filters( 'wc_price_based_country_settings', array(