Cart Data - Filter Hook References
This is simply a list of cart data-related filter hooks that can be found within the WooCommerce Partial COD - Payment Gateway Restrictions & Fees files. This list also includes the supported parameters and example codes.
woopcd_partialcod/get-cart-item
- Parameters:
- $item array()
- $cart_item array()
Example Codes:
- function custom_get_cart_item( $item, $cart_item ) {
- //add your custom code here
- return $notify_obj;
- }
- add_filter( 'woopcd_partialcod/get-cart-item', 'custom_get_cart_item', 10, 2 );
woopcd_partialcod/get-cart-product-data
- Parameters:
- $item_data array()
- $product object
- $item_key string
Example Codes:
- function custom_get_cart_product_data( $item_data, $product, $item_key ) {
- //add your custom code here
- return $item_data; }
- add_filter( 'woopcd_partialcod/get-cart-product-data', 'custom_get_cart_product_data', 10, 3 );
woopcd_partialcod/get-cart-totals
- Parameters:
- $cart_totals array()
- $source string
- $cart object
Example Codes:
- function custom_get_cart_totals( $cart_totals, $source, $cart ) {
- //add your custom code here
- return $cart_totals;
- }
- add_filter( 'woopcd_partialcod/get-cart-totals', 'custom_get_cart_totals', 10, 3 );
woopcd_partialcod/get-cart-applied-coupons
- Parameters:
- $cart_applied_coupons array()
- $source string
- $cart object
Example Codes:
- function custom_get_cart_applied_coupons( $cart_applied_coupons, $source, $cart ) {
- //add your custom code here
- return $cart_applied_coupons;
- }
- add_filter( 'woopcd_partialcod/get-cart-applied-coupons', 'custom_get_cart_applied_coupons', 10, 3 );
woopcd_partialcod/get-cart-shipping-rates
- Parameters:
- $cart_shipping_rates array()
- $source string
- $cart object
Example Codes:
- function custom_get_cart_shipping_rates( $cart_shipping_rates, $source, $cart ) {
- //add your custom code here
- return $cart_shipping_rates;
- }
- add_filter( 'woopcd_partialcod/get-cart-shipping-rates', 'custom_get_cart_shipping_rates', 10, 3 );
woopcd_partialcod/get-cart-method-ids
- Parameters:
- $cart_method_ids array()
- $source string
- $cart object
Example Codes:
- function custom_get_cart_method_ids( $cart_method_ids, $source, $cart ) {
- //add your custom code here
- return $cart_method_ids;
- }
- add_filter( 'woopcd_partialcod/get-cart-method-ids', 'custom_get_cart_method_ids', 10, 3 );
woopcd_partialcod/get-external-fees
- Parameters:
- $cart_external_fees array()
- $source string
- $cart object
Example Codes:
- function custom_get_external_fees( $cart_external_fees, $source, $cart ) {
- //add your custom code here
- return $cart_external_fees;
- }
- add_filter( 'woopcd_partialcod/get-external-fees', 'custom_get_external_fees', 10, 3 );
Related Articles
Partial Payment Amounts - Filter Hook References
This is simply a list of partial payment amount-related filter hooks that can be found within the WooCommerce Partial COD - Payment Gateway Restrictions & Fees files. This list also includes the supported parameters and example codes. ...
Gateway Fees - Filter Hook References
This is simply a list of gateway fee-related filter hooks that can be found within the WooCommerce Partial COD - Payment Gateway Restrictions & Fees files. This list also includes the supported parameters and example codes. ...
Cart Discounts - Filter Hook References
This is simply a list of cart discount-related filter hooks that can be found within the WooCommerce Partial COD - Payment Gateway Restrictions & Fees files. This list also includes the supported parameters and example codes. ...
Settings & Restrictions - Filter Hook References
This is simply a list of settings & restrictions-related filter hooks that can be found within the WooCommerce Partial COD - Payment Gateway Restrictions & Fees files. This list also includes the supported parameters and example codes. ...
Partial Payments - Filter Hook References
This is simply a list of partial payment-related filter hooks that can be found within the WooCommerce Partial COD - Payment Gateway Restrictions & Fees files. This list also includes the supported parameters and example codes. ...