WooCommerce Partial COD - Payment Gateway Restriction & Fees

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.


woopcd_partialcod-admin/method-options/get-{method_id}-rule-option-groups

  • Parameters:
  • $group_types array()
  • $method_id string

Example Codes:

  1. function custom_get_method_id_rule_option_groups( $group_types, $method_id ) {
  2.    //add your custom code here
  3.    return $group_types;
  4. }
  5. add_filter( 'woopcd_partialcod-admin/method-options/get-{method_id}-rule-option-groups', 'custom_get_method_id_rule_option_groups', 10, 2 );

woopcd_partialcod-admin/method-options/get-rule-option-groups

  • Parameters:
  • $group_types array()
  • $method_id string

Example Codes:

  1. function custom_get_rule_option_groups( $group_types, $method_id ) {
  2.    //add your custom code here
  3.    return $group_types;
  4. }
  5. add_filter( 'woopcd_partialcod-admin/method-options/get-rule-option-groups', 'custom_get_rule_option_groups', 10, 2 );

woopcd_partialcod-admin/method-options/get-{method_id}-rule-options

  • Parameters:
  • $option_types array()
  • $method_id string

Example Codes:

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

woopcd_partialcod-admin/method-options/get-rule-options

  • Parameters:
  • $option_types array()
  • $method_id string

Example Codes:

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

woopcd_partialcod-admin/method-options/get-rule-{option-option_type_id}-fields

  • Parameters:
  • $fields array()
  • $method_id string

Example Codes:

  1. function custom_get_rule_option_option_type_id_fields( $fields, $method_id ) {
  2.    //add your custom code here
  3.    return $fields;
  4. }
  5. add_filter( 'woopcd_partialcod-admin/method-options/get-rule-{option-option_type_id}-fields', 'custom_get_rule_option_option_type_id_fields', 10, 2 );

woopcd_partialcod-admin/process-option-type-{option_type_id}

  • Parameters:
  • $options array()
  • $raw_options array()
  • $args array()

Example Codes:

  1. function custom_process_option_type_option_type_id( $options, $raw_options, $args ) {
  2.    //add your custom code here
  3.    return $options;
  4. }
  5. add_filter( 'woopcd_partialcod-admin/process-option-type-{option_type_id}', 'custom_process_option_type_option_type_id', 10, 3 );

woopcd_partialcod/method-option

  • Parameters:
  • $option array()
  • $option_id string

Example Codes:

  1. function custom_method_option( $option, $option_id ) {
  2.    //add your custom code here
  3.    return $option;
  4. }
  5. add_filter( 'woopcd_partialcod/method-option', 'custom_method_option', 10, 2 );

woopcd_partialcod/get-{option_type_id}-options

  • Parameters:
  • $option array()
  • $option_args array()
  • $cart_data array()

Example Codes:

  1. function custom_get_option_type_id_options( $option, $option_args, $cart_data ) {
  2.    //add your custom code here
  3.    return $option;
  4. }
  5. add_filter( 'woopcd_partialcod/get-{option_type_id}-options', 'custom_get_option_type_id_options', 10, 3 );

woopcd_partialcod/get-{option_type_id}-messages

  • Parameters:
  • $m_messages array()
  • $option array()
  • $option_id array()

Example Codes:

  1. function custom_get_option_type_id_messages( $m_messages, $option, $option_id ) {
  2.    //add your custom code here
  3.    return $m_messages;
  4. }
  5. add_filter( 'woopcd_partialcod/get-{option_type_id}-messages', 'custom_get_option_type_id_messages', 10, 3 );

woopcd_partialcod/apply-{option_type_id}-method-option

  • Parameters:
  • $method array()
  • $option array()

Example Codes:

  1. function custom_apply_option_type_id_method_option( $method, $option ) {
  2.    //add your custom code here
  3.    return $method;
  4. }
  5. add_filter( 'woopcd_partialcod/apply-{option_type_id}-method-option', 'custom_apply_option_type_id_method_option', 10, 2 );

woopcd_partialcod/apply-method-messages

  • Parameters:
  • $messages array()

Example Codes:

  1. function custom_apply_method_messages( $messages ) {
  2.    //add your custom code here
  3.    return $messages;
  4. }
  5. add_filter( 'woopcd_partialcod/apply-method-messages', 'custom_apply_method_messages', 10, 1 );
    • 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. ...