Filters
GTSF_additional_cost_weight_periodical_point
Additional cost weight periodical point filter.
Additional cost weight periodical point filter.
file: geniki-taxydromiki-shipping-fees/class/class-gtsf-shipping-method.php
/**
* Additional cost weight periodical point filter.
*
* With this hook, you can change the additional_cost_weight_periodical_point,
* according to the desired zone code and subzone.
*
* @since 1.0.3
*
* @param float|int $return The additional cost weight periodical point before converted to html.
* @param string $zone_code. The zone code. Country or zone code.
* @param string $subzone The subzone. Default empty string.
* Possible values: _within_city, _land, _island, _inaccessible for GR
* and _zone1, _zone2 for BG
* @param object $this The incomplete object of this class.
*/
$return = apply_filters('GTSF_additional_cost_weight_periodical_point', $return, $zone_code, $subzone, $this);
GTSF_fixed_cost_weight_point
Fixed cost weight point filter.
Fixed cost weight point filter.
file: geniki-taxydromiki-shipping-fees/class/class-gtsf-shipping-method.php
/**
* Fixed cost weight point filter.
*
* With this hook, you can change the fixed_cost_weight_point,
* according to the desired zone code and subzone.
*
* @since 1.0.3
*
* @param float|int $return The fixed cost weight point before converted to html.
* @param string $zone_code. The zone code. Country or zone code.
* @param string $subzone The subzone. Default empty string.
* Possible values: _within_city, _land, _island, _inaccessible for GR
* and _zone1, _zone2 for BG
* @param object $this The incomplete object of this class.
*/
$return = apply_filters('GTSF_fixed_cost_weight_point', $return, $zone_code, $subzone, $this);
GTSF_form_fields
Form fields filter.
Form fields filter.
file: geniki-taxydromiki-shipping-fees/class/class-gtsf-shipping-method.php
/**
* Form fields filter.
*
* With this filter, you can filter the form fields
* that exists in plugin's setting page.
* This filter is called after the extra zones' settings have been merged in the form fields.
* Be careful with this hook. $this->form_fields are used both in frontend and backend.
*
* @since 1.0.0
*
* @param array $this->form_fields The form fields. They have the Woocommerce fields structure.
* The default fields are the following:
* - enabled
* - title
* - fixed_cost_weight_point
* - additional_cost_weight_periodical_point
* - GR_enabled
* - GR_within_city_areas
* - GR_within_city_cost
* - GR_within_city_extra_kg_cost
* - GR_land_cost
* - GR_land_extra_kg_cost
* - GR_island_cost
* - GR_island_extra_kg_cost
* - GR_inaccessible_cost
* - GR_inaccessible_extra_kg_cost
* - CY_enabled
* - CY_cost
* - CY_extra_kg_cost
* - BG_enabled
* - BG_zone1_cost
* - BG_zone1_extra_kg_cost
* - BG_zone2_cost
* - BG_zone2_extra_kg_cost
* - RO_enabled
* - RO_fixed_cost_weight_point
* - RO_additional_cost_weight_periodical_point
* - RO_cost
* - RO_extra_kg_cost
* @param object $this The incomplete object of this class.
*/
$this->form_fields = apply_filters('GTSF_form_fields', $this->form_fields, $this);
GTSF_free_shipping_price_html
Free shipping price html filter.
Free shipping price html filter.
file: geniki-taxydromiki-shipping-fees/geniki-taxydromiki-shipping-fees.php
/**
* Free shipping price html filter.
*
* With this filter, you can change the 0.00€ html,
* for example you can use the string "ΔΩΡΕΑΝ".
*
* @since 1.0.3
*
* @param string $free_shipping_price_html The html of the free shipping price for Geniki Taxydromiki courier.
* Default is the wc_price(0) html.
*/
$free_shipping_price_html = apply_filters('GTSF_free_shipping_price_html', $free_shipping_price_html);
GTSF_include_inaccessible_areas_within_city
Include or not the inaccessible areas within city areas.
Include or not the inaccessible areas within city areas.
file: geniki-taxydromiki-shipping-fees/class/class-gtsf-shipping-method.php
/**
* Include or not the inaccessible areas within city areas.
*
* With this filter, the developer has the choice to include the
* inaccessible areas in the areas that are considered within city.
*
* @since 1.0.0
*
* @param bool $inaccessible_included Defines if inaccessible areas included
* in is_within_city determination.
* @param object $this The incomplete object of this class.
* @param string $postcode The destination's postcode.
* @param string $address The destination's address_1.
* @param string $city The destination's city.
*/
$inaccessible_included = apply_filters('GTSF_include_inaccessible_areas_within_city', $inaccessible_included, $this, $postcode, $address, $city);
GTSF_is_free_shipping
The `is free shipping` filter.
The `is free shipping` filter.
file: geniki-taxydromiki-shipping-fees/class/class-gtsf-shipping-method.php
/**
* The `is free shipping` filter.
*
* With this filter, you can change whether the free shipping will be applied.
* Default condition is in Greece but not in inaccessible areas.
*
* Hooked: GTSF_free_shipping_default_hook
* TIP: To change the condition, copy the hook, give priority bigger than 10 and alter it
*
* @since 2.0.0
*
* @param bool $is_free_shipping Is free shipping boolean. Default is false.
* @param array $package Contains cart's & destination's details.
* @param object $this The incomplete object of this class.
* @param float $cost The shipping cost based on weight & destination.
*/
$is_free_shipping = apply_filters('GTSF_is_free_shipping', false, $package, $this, $cost);
GTSF_is_inaccessible
Is inaccessible filter.
Is inaccessible filter.
file: geniki-taxydromiki-shipping-fees/class/class-gtsf-shipping-method.php
/**
* Is inaccessible filter.
*
* With this filter, it can be determined if a destination is inaccessible or not.
* Only if the filter is not called, the destination is characterized as inaccessible
* by plugin's default rules.
*
* @since 1.0.0
*
* @param bool $is_inaccessible Defines if a destination is inaccessible area.
* @param object $this The incomplete object of this class.
* @param string $postcode The destination's postcode.
* @param string $address The destination's address_1.
* @param string $city The destination's city.
*/
$is_inaccessible = apply_filters('GTSF_is_inaccessible', $is_inaccessible, $this, $postcode, $address, $city);
GTSF_is_village
Is village filter.
Is village filter.
file: geniki-taxydromiki-shipping-fees/class/class-gtsf-shipping-method.php
/**
* Is village filter.
*
* Filters the boolean $is_village.
*
* @since 1.0.0
*
* @param bool $is_village Defines if a destination is a village.
* @param object $this The incomplete object of this class.
* @param string $postcode The destination's postcode.
* @param string $address The destination's address_1.
* @param string $city The destination's city.
*/
$is_village = apply_filters('GTSF_is_village', $is_village, $this, $postcode, $address, $city);
GTSF_register_extra_zones
Register extra zones filter.
Register extra zones filter.
file: geniki-taxydromiki-shipping-fees/class/class-gtsf-shipping-method.php
/**
* Register extra zones filter.
*
* By default, this plugin gives the ability to
* sends to and set shipping costs only for GR, CY, BG, RO.
* With this filter, we can register extra country zones or individual countries.
*
* @param array $extra_zones {
* Extra Zones settings. Default empty array.
*
* @type string|int $key {
* Zone key. Key can be anything.
*
* @type string $zone_code Zone code. For countries, use the 2-digit code. Required.
* @type string $zone_name Zone name. Is optional only for countries.
* @type string $default_countries Default countries. Optional. Default value for extra zone's countries field.
* @type string $fixed_cost_weight_point The fixed cost weight point for this zone. Optional.
* Default is the global fixed_cost_weight_point setting
* $this->settings['fixed_cost_weight_point'].
* @type string $additional_cost_weight_periodical_point The additional cost weight periodical point. Optional.
* Default is the global additional_cost_weight_periodical_point setting
* $this->settings['additional_cost_weight_periodical_point'].
* }
*
* $extra_zones = array(
* array(
* 'zone_code' => 'TR'
* //the zone_name is Turkey
* //the fixed_cost_weight_point of TR is the global fixed_cost_weight_point setting
* //the additional_cost_weight_periodical_point is the global additional_cost_weight_periodical_point setting
* ),
*
* array(
* 'zone_code' => 'RU',
* //the zone_name is Russia
* 'fixed_cost_weight_point' => 1,
* 'additional_cost_weight_periodical_point' => 1
* ),
*
* array(
* // if zone_code is not a country_code, you can fill in the countries of zone in the plugin' settings
* 'zone_code' => 'Z1',
* 'zone_name' => 'Zone 1',
* 'fixed_cost_weight_point' => 0.5,
* 'additional_cost_weight_periodical_point' => 0.5
* ),
*
* array(
* // if zone_code is not a country_code, you can fill in the countries of zone in the plugin' settings
* 'zone_code' => 'Z2',
* 'zone_name' => 'Zone 2',
* 'default_countries' => 'GB, FR, TR',
* 'fixed_cost_weight_point' => 0.5,
* 'additional_cost_weight_periodical_point' => 0.5
* ),
*
* array(
* 'zone_code' => 'REST', // if zone_code is REST, the rest countries automatically are assigned to this zone
* 'zone_name' => 'Rest of World',
* 'fixed_cost_weight_point' => 0.5,
* 'additional_cost_weight_periodical_point' => 0.5
* )
* );
* }
*
* HOW TO USE FILTER
* add_filter('GTSF_register_extra_zones', function($extra_zones){
* //change the $extra_zones as you want. You can copy the $extra_zones array from above
* return $extra_zones // return the array
* });
*
* @param object $this The incomplete object of this class.
*
* @since 1.0.0
*/
$extra_zones = apply_filters('GTSF_register_extra_zones', $extra_zones, $this);
GTSF_settings
Settings filter.
Settings filter.
file: geniki-taxydromiki-shipping-fees/class/class-gtsf-shipping-method.php
/**
* Settings filter.
*
* With this filter, you can filter the settings of plugin.
* If the setting is not set yet, it has the default value of corresponding form field.
* Be careful with this hook. $this->settings are used both in frontend and backend.
*
* @since 1.0.0
*
* @param array $this->settings The settings. The saved values of the form fields.
* The default list of settings are the following:
* - enabled
* - title
* - fixed_cost_weight_point
* - additional_cost_weight_periodical_point
* - GR_enabled
* - GR_within_city_areas
* - GR_within_city_cost
* - GR_within_city_extra_kg_cost
* - GR_land_cost
* - GR_land_extra_kg_cost
* - GR_island_cost
* - GR_island_extra_kg_cost
* - GR_inaccessible_cost
* - GR_inaccessible_extra_kg_cost
* - CY_enabled
* - CY_cost
* - CY_extra_kg_cost
* - BG_enabled
* - BG_zone1_cost
* - BG_zone1_extra_kg_cost
* - BG_zone2_cost
* - BG_zone2_extra_kg_cost
* - RO_enabled
* - RO_fixed_cost_weight_point
* - RO_additional_cost_weight_periodical_point
* - RO_cost
* - RO_extra_kg_cost
* @param object $this The incomplete object of this class.
*/
$this->settings = apply_filters('GTSF_settings', $this->settings, $this);
GTSF_shipping_cost
Shipping Cost filter.
Shipping Cost filter.
file: geniki-taxydromiki-shipping-fees/class/class-gtsf-shipping-method.php
/**
* Shipping Cost filter.
*
* With this filter, it is possible to filter the final cost based on package, cost and other
* settings of $this object
*
* @param float $cost The shipping cost based on weight & destination.
* @param array $package Contains cart's & destination's details.
* @param object $this The incomplete object of this class.
*/
$cost = apply_filters('GTSF_shipping_cost', $cost, $package, $this);
GTSF_tax_status
Tax status filter.
Tax status filter.
file: geniki-taxydromiki-shipping-fees/class/class-gtsf-shipping-method.php
/**
* Tax status filter.
*
* With this filter, it is possible to change the tax_status of this
* shipping method
*
* @param string $status Default 'none'. Accepts 'taxable', 'none'.
* @param object $this The incomplete object of this class.
*/
$this->tax_status = apply_filters('GTSF_tax_status', 'none', $this);
GTSF_zone_name
Zone name filter.
Zone name filter.
file: geniki-taxydromiki-shipping-fees/class/class-gtsf-shipping-method.php
/**
* Zone name filter.
*
* Filters the zone name.
*
* @since 1.0.0
*
* @param string $zone_name The zone name.
* @param string $zone_code The zone code.
* @param object $this The incomplete object of this class.
*/
$zone_name = apply_filters('GTSF_zone_name', $zone_name, $zone_code, $this);