Hooks / nab_{$experiment_type}_remove_alternative_content

do_action( "nab_{$experiment_type}_remove_alternative_content", object $attributes, int $experiment_id, string $alternative_id )

Fires when an alternative is being removed.

Description

Hook into this filter if the given alternative has some related content that has to be removed from the database too. For example, when removing a page alternative in a page experiment, the related page and all its metas have to be removed from wp_posts and wp_postmeta respectively.

Parameters

$attributes

(object) (Required) attributes of this alternative

$experiment_id

(int) (Required) ID of this experiment

$alternative_id

(string) (Required) ID of the alternative we want to clean

Source

File: includes/experiments/class-nelio-ab-testing-experiment.php

Changelog

Changelog
Version Description
5.0.0 Introduced.