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 array()
Example Codes:
- function custom_fee_title( $cart_item, $item ) {
- //add your custom code here
- return $cart_item;
- }
- add_filter( 'wtars_shipped/get-cart-item', 'custom_get_cart_item', 10, 2 );
wtars_shipped/get-cart-product-data
- Parameters:
- $product_data array()
- $product array()
- $item_key array()
Example Codes:
- function custom_get_cart_product_data( $product_data, $product, $item_key ) {
- //add your custom code here
- return $product_data;
- }
- add_filter( 'wtars_shipped/get-cart-product-data', 'custom_get_cart_product_data', 10, 3 );
wtars_shipped/get-cart-totals
- Parameters:
- $totals array()
- $cart array()
Example Codes:
- function custom_get_cart_totals( $totals, $cart ) {
- //add your custom code here
- return $totals;
- }
- add_filter( 'wtars_shipped/get-cart-totals', 'custom_get_cart_totals', 10, 2 );
wtars_shipped/get-cart-applied-coupons
- Parameters:
- $applied_coupons array()
- $cart array()
Example Codes:
- function custom_get_cart_applied_coupons( $applied_coupons, $cart ) {
- //add your custom code here
- return $applied_coupons;
- }
- add_filter( 'wtars_shipped/get-cart-applied-coupons', 'custom_get_cart_applied_coupons', 10, 2 );
wtars_shipped/get-cart-shipping-rates
- Parameters:
- $shipping_rates array()
- $cart array()
Example Codes:
- function custom_get_cart_shipping_rates( $shipping_rates, $cart ) {
- //add your custom code here
- return $shipping_rates;
- }
- add_filter( 'wtars_shipped/get-cart-shipping-rates', 'custom_get_cart_shipping_rates', 10, 2 );
wtars_shipped/get-cart-method-id
- Parameters:
- $method_id array()
- $cart array()
Example Codes:
- function custom_get_cart_method_id( $method_id, $cart ) {
- //add your custom code here
- return $method_id;
- }
- add_filter( 'wtars_shipped/get-cart-method-id', 'custom_get_cart_method_id', 10, 2 );
wtars_shipped/get-cart-customer
- Parameters:
- $customer array()
- $cart array()
Example Codes:
- function custom_get_cart_customer( $customer, $cart ) {
- //add your custom code here
- return $customer;
- }
- add_filter( 'wtars_shipped/get-cart-customer', 'custom_get_cart_customer', 10, 2 );
Related Articles
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 ...
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 - 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: ...
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() ...