WooCommerce Partial COD - Payment Gateway Restriction & Fees

Cart Total Calculations - Filter Hook References

This is simply a list of cart total calculation-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-admin/method-options/get-cart-totals-options

  • Parameters:
  • $options array()

Example Codes:

  1. function custom_get_method_options_cart_totals_options( $options ) {
  2.    //add your custom code here
  3.    return $options;
  4. }
  5. add_filter( 'woopcd_partialcod-admin/method-options/get-cart-totals-options', 'custom_get_method_options_cart_totals_options', 10, 1 );

woopcd_partialcod-admin/partial-payment/get-cart-totals-options

  • Parameters:
  • $options array()

Example Codes:

  1. function custom_get_partial_payment_cart_totals_options( $options ) {
  2.    //add your custom code here
  3.    return $options;
  4. }
  5. add_filter( 'woopcd_partialcod-admin/partial-payment/get-cart-totals-options', 'custom_get_partial_payment_cart_totals_options', 10, 1 );

woopcd_partialcod-admin/cart-discounts/get-cart-totals-options

  • Parameters:
  • $options array()

Example Codes:

  1. function custom_get_cart_discounts_cart_totals_options( $options ) {
  2.    //add your custom code here
  3.    return $options;
  4. }
  5. add_filter( 'woopcd_partialcod-admin/cart-discounts/get-cart-totals-options', 'custom_get_cart_discounts_cart_totals_options', 10, 1 );

woopcd_partialcod-admin/cart-fees/get-cart-totals-options

  • Parameters:
  • $options array()

Example Codes:

  1. function custom_get_cart_fees_cart_totals_options( $options ) {
  2.    //add your custom code here
  3.    return $options;
  4. }
  5. add_filter( 'woopcd_partialcod-admin/cart-fees/get-cart-totals-options', 'custom_get_cart_fees_cart_totals_options', 10, 1 );

woopcd_partialcod-admin/order-activities/get-order-totals-options

  • Parameters:
  • $options array()

Example Codes:

  1. function custom_get_order_activities_cart_totals_options( $options ) {
  2.    //add your custom code here
  3.    return $options;
  4. }
  5. add_filter( 'woopcd_partialcod-admin/order-activities/get-order-totals-options', 'custom_get_order_activities_cart_totals_options', 10, 1 );

woopcd_partialcod/calculate-cart-{option_id}-totals

  • Parameters:
  • $totals numeric
  • $cart_data array()

Example Codes:

  1. function custom_calculate_cart_option_id_totals( $totals, $cart_data ) {
  2.   //add your custom code here
  3.    return $totals;
  4. }
  5. add_filter( 'woopcd_partialcod/calculate-cart-{option_id}-totals', 'custom_calculate_cart_option_id_totals', 10, 2 );

woopcd_partialcod/calculate-order-{option_id}-totals

  • Parameters:
  • $totals numeric
  • $cart_data array()

Example Codes:

  1. function custom_calculate_order_option_id_totals( $totals, $cart_data ) {
  2.    //add your custom code here
  3.    return $totals;
  4. }
  5. add_filter( 'woopcd_partialcod/calculate-order-{option_id}-totals', 'custom_calculate_order_option_id_totals', 10, 2 );
    • Related Articles

    • 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. ...
    • 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

      The Gateway Fees setting page can be used to create and manage gateway fees. Multiple gateway fees can be created based on product rules and conditions. Gateway Fees Limit This field determines whether or not the gateway fees should have fee limits. ...
    • 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. ...
    • Cart Discounts

      The Cart Discounts setting page can be used to create and manage gateway fees. Multiple cart discounts can be created based on product rules and conditions. Discounts Limit This field determines whether or not the cart discounts should have limits. ...