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:
- function custom_rate_cost( $rate_cost, $rate_id, $instance_id ) {
- //add your custom code here
- return $rate_cost;
- }
- 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:
- function custom_rate_fee( $rate_fee, $rate, $fee, $instance_id ) {
- //add your custom code here
- return $rate_fee;
- }
- 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:
- function custom_rate_taxes( $rate_taxes, $rate_id, $instance_id ) {
- //add your custom code here
- return $rate_taxes;
- }
- 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:
- function custom_rate_title( $rate_title, $rate_id, $instance_id ) {
- //add your custom code here
- return $rate_title;
- }
- 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:
- function custom_rate_desc( $rate_desc, $rate_id, $instance_id ) {
- //add your custom code here
- return $rate_desc;
- }
- 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:
- function custom_rate_tooltip( $rate_tooltip, $rate_id, $instance_id ) {
- //add your custom code here
- return $rate_tooltip;
- }
- 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:
- function custom_rate_meta( $rate_metas, $rate_id, $instance_id ) {
- //add your custom code here
- return $rate_metas;
- }
- add_filter( 'wtars_shipped/rate-meta', 'custom_rate_meta', 10, 3 );