Conditions - Filter Hook References

Modified on Mon, 19 Sep, 2022 at 8:28 AM

This is simply a list of conditions related filter hooks found within the WooCommerce Table Rate Shipping files. This list also includes the supported parameters and example codes.


wtars_shipped_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( 'wtars_shipped_admin/get-condition-groups', 'custom_get_condition_groups', 10, 2 );

wtars_shipped_admin/get-{group_type_id}-group-conditions

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


Example Codes:

function custom_get_group_type_id_group_conditions( $condition_types, $args ) {

    //add your custom code here
    return $condition_types;
}

add_filter( 'wtars_shipped_admin/get-group_type_id-group-conditions', 'custom_get_group_type_id_group_conditions', 10, 2 );

wtars_shipped_admin/get-{condition_type_id}-condition-fields

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


Example Codes:

function custom_get_condition_type_id_condition_fields( $in_fields, $args ) {

    //add your custom code here
    return $in_fields;
}

add_filter( 'wtars_shipped_admin/get-condition_type_id-condition-fields', 'custom_get_condition_type_id_condition_fields', 10, 2 );

wtars_shipped/validate-{condition_type_id}-condition

  • Parameters:
  • $condition array()
  • $data array()


Example Codes:

function custom_validate_condition_type_id_condition( $condition, $data ) {

    //add your custom code here
    return true; // true or false
}

add_filter( 'wtars_shipped/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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article