products_remove_sets.after

Triggered before products are excluded from static sets. Also when products contained in such sets are deleted.

Available since version 11.3.0.

Shop-Script

Input (passed by reference)

$params['set_ids'] array<int> IDs of the sets from which products are being excluded.
$params['products_id'] array<int> IDs of currently existing products.
… your plugin code …

Output

Shop-Script

Plugin code example

PHP

public function productsRemoveSetsAfter($params)
{
    waLog::dump(
        sprintf_wp(
            'Products with these IDs: %s have just been removed from sets with these IDs: %s.',
            implode(', ', $params['products_id']),
            implode(', ', $params['set_ids'])
        ),
        'shop/plugins/' . $this->id . '/products_remove_sets.after.log'
    );
}