הגבלת רכישה לכל המוצרים למקסימום 1 מכל מוצר

PHOTO EMBED

Tue May 18 2021 12:43:29 GMT+0000 (Coordinated Universal Time)

Saved by @Shesek

/*
* Changing the maximum quantity to 1 for all the WooCommerce products
*/

function woocommerce_quantity_input_max_callback( $max, $product ) {
	$max = 1;  
	return $max;
}
add_filter( 'woocommerce_quantity_input_max', 'woocommerce_quantity_input_max_callback', 10, 2 );
?>
content_copyCOPY