WooCommerce Partial COD - Payment Gateway Restriction & Fees

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:

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

  1. function custom_get_cart_product_data( $item_data, $product, $item_key ) {
  2.   //add your custom code here
  3.   return $item_data; }
  4. 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:

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

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

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

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

  1. function custom_get_external_fees( $cart_external_fees, $source, $cart ) {
  2.    //add your custom code here
  3.    return $cart_external_fees;
  4. }
  5. 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. ...