products_visibility_set.before
Triggered before 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_attempted'] array IDs of products corresponding to the hash in the current page URL.
$params['collection'] shopProductsCollection Instance of a product collection handling class corresponding to selected products.
$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_attempted'] array IDs of products corresponding to the hash in the current page URL.
$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 productsVisibilitySetBefore(&$params) { shopMyPluginHelper::updateProductsVisibility($params); }