fg_entryautomation_search_criteria

Description

This filter is executed when preparing the search criteria to retrieve entries for Automation.

Usage

PHP
add_filter( 'fg_entryautomation_search_criteria', 'your_function_name', 10, 3 );

Parameters

  • $search_criteria array
    The search criteria to be filtered.
  • $task array
    The current Automation Task.
  • $form array
    The current Automation action’s form.

Examples

Search Only Failed Payments

This example will update the search criteria to only include entries whose payment failed.

<?php
add_filter( 'fg_entryautomation_search_criteria', 'only_automate_failed_payments', 10, 3 );
function only_automate_failed_payments( $search_criteria, $feed, $form ) {
$search_criteria['field_filters'][] = array( 'key' => 'payment_status', 'value' => 'Failed' );
return $search_criteria;
}