Conditions - Filter Hook References

Conditions - Filter Hook References

This is simply a list of condition-related filter hooks included in the WooCommerce Catalog Mode - Pricing, Enquiry Forms & Promotions files. This list also includes the supported parameters and example codes.


wmodes-admin/get-condition-groups

  • Parameters:
  • $group_types array()
  • $args array()

Example Codes:

  1. function custom_get_condition_groups( $group_types, $args ) {
  2.    //add your custom code here
  3.    return $group_types;
  4. }
  5. add_filter( 'wmodes-admin/get-condition-groups', 'custom_get_condition_groups', 10, 2 );

wmodes-admin/get-{group_type_id}-group-conditions

  • Parameters:
  • $condition_types array()
  • $args array()

Example Codes:

  1. function custom_get_group_type_id_group_conditions( $condition_types, $args ) {
  2.    //add your custom code here
  3.    return $condition_types;
  4. }
  5. add_filter( 'wmodes-admin/get-{group_type_id}-group-conditions', 'custom_get_group_type_id_group_conditions', 10, 2 );

wmodes-admin/get-{condition_type_id}-condition-fields

  • Parameters:
  • $fields array()
  • $args array()

Example Codes:

  1. function custom_get_condition_type_id_condition_fields( $fields, $args ) {
  2.    //add your custom code here
  3.    return $fields;
  4. }
  5. add_filter( 'wmodes-admin/get-{condition_type_id}-condition-fields', 'custom_get_condition_type_id_condition_fields', 10, 2 );

wmodes/validate-condition

  • Parameters:
  • $is_valid bool
  • $fields array()
  • $args array()

Example Codes:

  1. function custom_validate_condition( $is_valid, $condition, $data ) {
  2.    //add your custom code here
  3.    return true; // returns true or false
  4. }
  5. add_filter( 'wmodes/validate-condition', 'custom_validate_condition', 10, 3 );
    • Related Articles

    • Others - Filter Hook References

      This is simply a list of other filter hooks included in the WooCommerce Catalog Mode - Pricing, Enquiry Forms & Promotions files. This list also includes the supported parameters and example codes. wmodes-admin/get-product-tabs Parameters: ...
    • Product Rules - Filter Hook References

      This is simply a list of product rule-related filter hooks included in the WooCommerce Catalog Mode - Pricing, Enquiry Forms & Promotions files. This list also includes the supported parameters and example codes. ...
    • Views & Locations - Filter Hook References

      This is simply a list of view and location-related filter hooks included in the WooCommerce Catalog Mode - Pricing, Enquiry Forms & Promotions files. This list also includes the supported parameters and example codes. wmodes/register-view-locations ...
    • Cart Data - Filter Hook References

      This is simply a list of cart data-related filter hooks included in the WooCommerce Catalog Mode - Pricing, Enquiry Forms & Promotions files. This list also includes the supported parameters and example codes. wmodes/get-cart-item Parameters: ...
    • Product Data - Filter Hook References

      This is simply a list of product data-related filter hooks included in the WooCommerce Catalog Mode - Pricing, Enquiry Forms & Promotions files. This list also includes the supported parameters and example codes. wmodes/get-product-properties ...