Developer Resources

A comprehensive list of filters and actions included in our plugin

Hooks / nab_{$experiment_type}_duplicate_alternative_content

apply_filters( “nab_{$experiment_type}_duplicate_alternative_content”, array $new_alternative, array $old_alternative, int $new_experiment_id, string $new_alternative_id, int $old_experiment_id, string $old_alternative_id )

Fires when an experiment is being duplicated and one of its alternatives is to be duplicated into the new experiment.

Parameters

$new_alternative array

(Required) new alternative (by default, an exact copy of old alternative).

$old_alternative array

(Required) old alternative.

$new_experiment_id int

(Required) id of the new experiment.

$new_alternative_id string

(Required) id of the new alternative.

$old_experiment_id int

(Required) id of the old experiment.

$old_alternative_id string

(Required) id of the old alternative.