Shipping Rates - Filter Hook References - Shipped

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 array()
  • $instance_id array()

Example Codes:

  1. function custom_rate_cost( $rate_cost, $rate_id, $instance_id ) {
  2.   //add your custom code here
  3.   return $rate_cost;
  4. }
  5. add_filter( 'wtars_shipped/rate-cost', 'custom_rate_cost', 10, 3 );

wtars_shipped/rate-fee

  • Parameters:
  • $rate_fee array()
  • $rate array()
  • $fee array()
  • $instance_id array()

Example Codes:

  1. function custom_rate_fee( $rate_fee, $rate, $fee, $instance_id ) {
  2.   //add your custom code here
  3.   return $rate_fee;
  4. }
  5. add_filter( 'wtars_shipped/rate-fee', 'custom_rate_fee', 10, 4 );

wtars_shipped/rate-taxes

  • Parameters:
  • $rate_taxes array()
  • $rate_id array()
  • $instance_id array()

Example Codes:

  1. function custom_rate_taxes( $rate_taxes, $rate_id, $instance_id ) {
  2.   //add your custom code here
  3.   return $rate_taxes;
  4. }
  5. add_filter( 'wtars_shipped/rate-taxes', 'custom_rate_taxes', 10, 3 );

wtars_shipped/rate-title

  • Parameters:
  • $rate_title array()
  • $rate_id array()
  • $instance_id array()

Example Codes:

  1. function custom_rate_title( $rate_title, $rate_id, $instance_id ) {
  2.   //add your custom code here
  3.   return $rate_title;
  4. }
  5. add_filter( 'wtars_shipped/rate-title', 'custom_rate_title', 10, 3 );

wtars_shipped/rate-desc

  • Parameters:
  • $rate_desc array()
  • $rate_id array()
  • $instance_id array()

Example Codes:

  1. function custom_rate_desc( $rate_desc, $rate_id, $instance_id ) {
  2.   //add your custom code here
  3.   return $rate_desc;
  4. }
  5. add_filter( 'wtars_shipped/rate-desc', 'custom_rate_desc', 10, 3 );

wtars_shipped/rate-tooltip

  • Parameters:
  • $rate_tooltip array()
  • $rate_id array()
  • $instance_id array()

Example Codes:

  1. function custom_rate_tooltip( $rate_tooltip, $rate_id, $instance_id ) {
  2.   //add your custom code here
  3.   return $rate_tooltip;
  4. }
  5. add_filter( 'wtars_shipped/rate-tooltip', 'custom_rate_tooltip', 10, 3 );

wtars_shipped/rate-meta

  • Parameters:
  • $rate_metas array()
  • $rate_id array()
  • $instance_id array()

Example Codes:

  1. function custom_rate_meta( $rate_metas, $rate_id, $instance_id ) {
  2.   //add your custom code here
  3.   return $rate_metas;
  4. }
  5. add_filter( 'wtars_shipped/rate-meta', 'custom_rate_meta', 10, 3 );
    • 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: ...
    • Shipping Rates

      The Shipping Rates setting page can be used to create and manage shipping rates (i.e the shipping methods). Multiple shipping rates and shipping costs can be made available based on product rules and conditions. Cost Limit Per Rate This field ...
    • Others - Filter Hook References

      This is simply a list of other filter hooks found within the WooCommerce Table Rate Shipping files. This list also includes the supported parameters and example codes. wtars_shipped_admin/get-settings-section-fields Parameters: $in_fields array() ...
    • 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 ...
    • Conditions - Filter Hook References

      This is simply a list of conditions 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-condition-groups Parameters: $group_types ...