products_visibility_set.after

Triggered on setting visibility for a product group.

Shop-Script

Input (passed by reference)

$params array Parameters.
$params['status'] bool Product visibility status.
$params['update_sku'] bool Whether availability for order for selected products’ SKUs must be set according to selected visibility status.
$params['hash'] string Hash used to create an instance of a product collection handling class corresponding to selected products.
$params['products_id'] array IDs of products, to which a user has access, selected for visibility status change.
$params['products_id_denied'] array IDs of products among selected ones to which a user has no access.
$params['products_id_attempted'] array IDs of products among selected ones to which a user has access.
$params['products_id_successfull'] array IDs of products among selected ones whose visibility was changed.
$params['collection'] shopProductsCollection Instance of a product collection handling class corresponding to selected products.
… your plugin code …

Output

Shop-Script

Plugin code example

PHP

public function productsVisibilitySetAfter($params)
{
    waLog::dump($params, 'shop/myplugin/products-visibility-set-after.log');
}