Package Contents - Filter Hook References - Shipped

Package Contents - Filter Hook References

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:

  1. function custom_get_package_item( $package_item, $item ) {
  2.   //add your custom code here
  3.   return $package_item;
  4. }
  5. 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:

  1. function custom_get_grouped_packages( $grouped_packages, $group_by, $data ) {
  2.   //add your custom code here
  3.   return $grouped_packages;
  4. }
  5. 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:

  1. function custom_get_package_destination( $package_destination, $package ) {
  2.   //add your custom code here
  3.   return $package_destination;
  4. }
  5. add_filter( 'wtars_shipped/get-package-destination', 'custom_get_package_destination', 10, 2 );
    • Related Articles

    • Shipping Costs / Shipping Fees - Filter Hook References

      This is simply a list of shipping costs/fees related filter hooks found within the WooCommerce Table Rate Shipping files. This list also includes the supported parameters and example codes. wtars_shipped_admin/get-cost-type-groups Parameters: ...
    • Cart Contents - Filter Hook References

      This is simply a list of cart 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-cart-item Parameters: $cart_item array() $item ...
    • Shipping Rates - Filter Hook References

      This is simply a list of shipping rates-related filter hooks found within the WooCommerce Table Rate Shipping files. This list also includes the supported parameters and example codes. wtars_shipped/rate-cost Parameters: $rate_cost array() $rate_id ...
    • Cart / Package Totals - Filter Hook References

      This is simply a list of cart/package totals-related filter hooks found within the WooCommerce Table Rate Shipping files. This list also includes the supported parameters and example codes. wtars_shipped_admin/get-totals-options Parameters: ...
    • Product Rules - Filter Hook References

      This is simply a list of product rules related filter hooks found within the WooCommerce Table Rate Shipping files. This list also includes the supported parameters and example codes. wtars_shipped_admin/get-product-filter-groups Parameters: ...