This is simply a list of condition-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/get-condition-groups
- Parameters:
- $group_types array()
- $args array()
Example Codes:
function custom_get_condition_groups( $group_types, $args ) { //add your custom code here return $group_types; } add_filter( 'woopcd_partialcod-admin/get-condition-groups', 'custom_get_condition_groups', 10, 2 );
woopcd_partialcod-admin/get-{group_type_id}-group-conditions
- Parameters:
- $condition_types array()
- $args array()
Example Codes:
function custom_get_group_conditions( $condition_types, $args ) { //add your custom code here return $condition_types; } add_filter( 'woopcd_partialcod-admin/get-{group_type_id}-group-conditions', 'custom_get_group_conditions', 10, 2 );
woopcd_partialcod-admin/get-{condition_type_id}-condition-fields
- Parameters:
- $fields array()
- $args array()
Example Codes:
function custom_get_condition_type_id_conditions( $fields, $args ) { //add your custom code here return $fields; } add_filter( 'woopcd_partialcod-admin/get-{condition_type_id}-condition-fields', 'custom_get_condition_type_id_conditions', 10, 2 );
woopcd_partialcod-admin/get-{condition_type_id}-condition-fields
- Parameters:
- $condition array()
- $cart_data array()
Example Codes:
function custom_validate_condition_type_id_condition( $condition, $cart_data ) { //add your custom code here return true; // true or false } add_filter( 'woopcd_partialcod/validate-{condition_type_id}-condition', 'custom_validate_condition_type_id_condition', 10, 2 );
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article