WooCommerce Partial COD - Payment Gateway Restriction & Fees

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.


woopcd_partialcod/discount-title

  • Parameters:
  • $discount_title string
  • $discount_key string
  • $discount array()

Example Codes:

  1. function custom_discount_title( $discount_title, $discount_key, $discount ) {
  2.   //add your custom code here
  3.   return $discount_title;
  4. }
  5. add_filter( 'woopcd_partialcod/discount-title', 'custom_discount_title', 10, 3 );

woopcd_partialcod/discount-amount

  • Parameters:
  • $discount_amount numeric
  • $discount_key string
  • $discount array()

Example Codes:

  1. function custom_discount_amount( $discount_amount, $discount_key, $discount ) {
  2.   //add your custom code here
  3.   return $discount_amount;
  4. }
  5. add_filter( 'woopcd_partialcod/discount-amount', 'custom_discount_amount', 10, 3 );

woopcd_partialcod/discount-amount-taxes

  • Parameters:
  • $discount_taxes array()
  • $discount_key string
  • $discount array()

Example Codes:

  1. function custom_discount_amount_taxes( $discount_taxes, $discount_key, $discount ) {
  2.   //add your custom code here
  3.   return $discount_taxes;
  4. }
  5. add_filter( 'woopcd_partialcod/discount-amount-taxes', 'custom_discount_amount_taxes', 10, 3 );

woopcd_partialcod/discount-amount-tax

  • Parameters:
  • $discount_amount_tax numeric
  • $discount_key string
  • $discount array()

Example Codes:

  1. function custom_discount_amount_tax( $discount_amount_tax, $discount_key, $discount ) {
  2.   //add your custom code here
  3.   return $discount_amount_tax;
  4. }
  5. add_filter( 'woopcd_partialcod/discount-amount-tax', 'custom_discount_amount_tax', 10, 3 );

woopcd_partialcod/discount-desc

  • Parameters:
  • $discount_desc string
  • $discount_key string
  • $discount array()

Example Codes:

  1. function custom_discount_desc( $discount_desc, $discount_key, $discount ) {
  2.   //add your custom code here
  3.   return $discount_desc;
  4. }
  5. add_filter( 'woopcd_partialcod/discount-desc', 'custom_discount_desc', 10, 3 );

woopcd_partialcod/discount-coupon-amount

  • Parameters:
  • $discount_coupon_amount numeric
  • $coupon_code string
  • $discount_key string
  • $discount array()

Example Codes:

  1. function custom_discount_coupon_amount( $discount_coupon_amount, $coupon_code, $discount_key, $discount ) {
  2.   //add your custom code here
  3.   return $discount_coupon_amount;
  4. }
  5. add_filter( 'woopcd_partialcod/discount-coupon-amount', 'custom_discount_coupon_amount', 10, 4 );

woopcd_partialcod/discount-coupon-title

  • Parameters:
  • $discount_coupon_title string
  • $coupon_code string
  • $discount_key string
  • $discount array()

Example Codes:

  1. function custom_discount_coupon_title( $discount_coupon_title, $coupon_code, $discount_key, $discount ) {
  2.   //add your custom code here
  3.   return $discount_coupon_title;
  4. }
  5. add_filter( 'woopcd_partialcod/discount-coupon-title', 'custom_discount_coupon_title', 10, 4 );

woopcd_partialcod/discount-coupon-desc

  • Parameters:
  • $discount_coupon_title string
  • $coupon_code string
  • $discount_key string
  • $discount array()

Example Codes:

  1. function custom_discount_coupon_desc( $discount_coupon_desc, $coupon_code, $discount_key, $discount ) {
  2.   //add your custom code here
  3.   return $discount_coupon_desc;
  4. }
  5. add_filter( 'woopcd_partialcod/discount-coupon-desc', 'custom_discount_coupon_desc', 10, 4 );
    • 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. ...
    • 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. ...
    • Cart Notifications - Filter Hook References

      This is simply a list of cart notification-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. ...