fc_shipping_method_substep_text_package_destination_data
Type: Filter
Filters the shipping method substep text package destination data.
Signature
apply_filters( 'fc_shipping_method_substep_text_package_destination_data', $destination, $package_index, $package, $chosen_method, $method );
Parameters
| Name | Type | Description |
|---|---|---|
$destination | mixed | Destination. |
$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_data',
/**
* Add custom data to package destination.
*
* @param mixed $destination Destination.
* @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 mixed Filtered value.
*/
function( $destination, $recurring_cart_package_key, $package, $chosen_recurring_method, $method ) {
$destination['custom_field'] = 'Custom value';
return $destination;
},
10,
5
);