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
| Name | Type | Description |
|---|---|---|
$destination_text | string | Destination text. |
$package_index | int | Zero-based package index. |
$package | array | Shipping package data. |
$chosen_method | string | Chosen method. |
$method | \WC_Shipping_Rate | Method. |
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
);