You are here

function acquia_lift_personalize_agent_update_status in Acquia Lift Connector 7.2

Same name and namespace in other branches
  1. 7 acquia_lift.module \acquia_lift_personalize_agent_update_status()

Implements hook_personalize_agent_update_status().

File

./acquia_lift.module, line 794
acquia_lift.module Provides Acquia Lift-specific personalization functionality.

Code

function acquia_lift_personalize_agent_update_status($agent_name, $old_status, $status) {
  $agent = personalize_agent_load($agent_name);
  if (!acquia_lift_is_targeting_agent($agent)) {
    return;
  }
  $nested = acquia_lift_get_nested_tests($agent);
  foreach ($nested as $test_agent) {
    personalize_agent_set_status($test_agent, $status);
  }
}