Skip to main content

fc_shipping_method_substep_text_package_destination_text

Type: Filter

Filters the shipping method substep text package destination text.

Signature​

apply_filters( 'fc_shipping_method_substep_text_package_destination_text', $destination_text, $package_index, $package, $chosen_method, $method );

Parameters​

NameTypeDescription
$destination_textstringDestination text.
$package_indexintZero-based package index.
$packagearrayShipping package data.
$chosen_methodstringChosen method.
$method\WC_Shipping_RateMethod.

Since​

  • 3.0.3

Source: inc/checkout-steps.php

Examples​

add_filter( 'fc_shipping_method_substep_text_package_destination_text',
/**
* Customize package destination text.
*
* @param string $destination_text Destination text.
* @param mixed $recurring_cart_package_key Recurring cart package key.
* @param array $package Shipping package data.
* @param mixed $chosen_recurring_method Chosen recurring method.
* @param \WC_Shipping_Rate $method Method.
* @return string Filtered value.
*/
function( $destination_text, $recurring_cart_package_key, $package, $chosen_recurring_method, $method ) {
return 'Destination: ' . $destination_text;
},
10,
5
);