wc_product_pre_has_unique_sku, true, $product_id, $new_sku

wc_product_pre_has_unique_sku, true, $product_id, $new_sku

Appears in:
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.11.0.0

apply_filters('wc_product_pre_has_unique_sku, true, $product_id, $new_sku') is found 1 times:

  • /includes/admin/class-wc-admin-duplicate-product.php line 394
    		 * @param bool|null $has_unique_sku Set to a boolean value to short-circuit the default SKU check.
    		 * @param int       $product_id     The ID of the current product.
    		 * @param string    $sku            The SKU to check for uniqueness.
    		 */
    		$pre_has_unique_sku = apply_filters( 'wc_product_pre_has_unique_sku', true, $product_id, $new_sku );
    
    		if ( $pre_has_unique_sku ) {
    			/**
    			 * Gives plugins an opportunity to verify SKU uniqueness themselves. Filter added to keep backwards
    			 * compatibility with `wc_product_has_unique_sku()`.
    			 * See: https://github.com/woocommerce/woocommerce/pull/62628