This is simply a list of package contents-related filter hooks found within the WooCommerce Table Rate Shipping files. This list also includes the supported parameters and example codes.
wtars_shipped/get-package-item
- Parameters:
- $package_item array()
- $item array()
Example Codes:
- function custom_get_package_item( $package_item, $item ) {
- //add your custom code here
- return $package_item;
- }
- add_filter( 'wtars_shipped/get-package-item', 'custom_get_package_item', 10, 2 );
wtars_shipped/get-grouped-packages
- Parameters:
- $grouped_packages array()
- $group_by array()
- $data array()
Example Codes:
- function custom_get_grouped_packages( $grouped_packages, $group_by, $data ) {
- //add your custom code here
- return $grouped_packages;
- }
- add_filter( 'wtars_shipped/get-grouped-packages', 'custom_get_grouped_packages', 10, 3 );
wtars_shipped/get-package-destination
- Parameters:
- $package_destination array()
- $package array()
Example Codes:
- function custom_get_package_destination( $package_destination, $package ) {
- //add your custom code here
- return $package_destination;
- }
- add_filter( 'wtars_shipped/get-package-destination', 'custom_get_package_destination', 10, 2 );