applyFilters( "area_trigger_conditions" )

applyFilters( "area_trigger_conditions", conditions, area );
applyFilters( "area_trigger_conditions_{key}", conditions, area );

Filter the condition promise before a trigger is fired. This filter is called every time an automatic trigger is fired.

The dynamic part of the filter name is the sanitized Area key. See DiviAreaItem.theKey() for details.

When all conditions are met, the Area is opened. When one condition fails, the Area stays hidden.


(Promise, required) A promise that resolve()s when all conditions are met, or reject()s when a condition is not met.
(DiviAreaItem, required) The new area instance.


addAction("area_trigger_conditions", function(conditions, area) {
  function customCheck(resolve, reject) {
    if (DiviArea.isClosed(area)) {
      reject("Area is still marked as closed");
    } else {

  conditions = conditions.then(() => new Promise(customCheck));

  return conditions;


As the Area is only displayed after the Promise was resolved, you should avoid to use time consuming checks (such as Ajax requests) during this filter. If a condition takes a longer to validate, it's better to check it during the area_general_conditions filter, which runs directly after the page has loaded.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.