Snippets, WOO
add_action( ‘woocommerce_check_cart_items’, ‘limiter_quantite_max_produit’ ); function limiter_quantite_max_produit() { $quantite_max = 5; $produits_limites = array( 229,231,233 ); // Remplace ces ID par les ID réels de tes produits...Snippets, WOO
/*Product attributes to body class*/ function add_product_attributes_to_body( $classes ) { if ( is_product() ) { $product = wc_get_product(); $attributes = $product->get_attributes(); foreach ( $attributes as $attribute ) { $attribute_name = $attribute->get_name();...Snippets, WOO
/* Classe de livrasion as body class */ function add_delivery_class_to_body( $classes ) { if ( is_product() ) { $product = wc_get_product(); $shipp = $product->get_shipping_class(); $classes[] = $shipp; } return $classes; } add_filter( ‘body_class’,...Snippets, WOO
/******* Attributes on facture + styles WP OVERNIGHT WooCommerce PDF Invoices & Packing Slips *******/ add_action( ‘wpo_wcpdf_after_item_meta’, ‘wpo_wcpdf_show_product_attributes’, 10, 3 ); function wpo_wcpdf_show_product_attributes (...Snippets, WOO
CSS .woocommerce button[name=”update_cart”], .woocommerce input[name=”update_cart”] { display: none; } JS var timeout; $(‘.woocommerce’).on(‘change’, ‘input.qty’, function(){ if ( timeout !== undefined ) {...Snippets, WOO
//——————-France payment only————————- add_filter( ‘woocommerce_available_payment_gateways’, ‘allow_france_only’ ); function allow_france_only(...