Javascript, Snippets
var globalDataUrl = “”; function convertToDataURL(url, callback) { var xhr = new XMLHttpRequest(); xhr.onload = function () { var reader = new FileReader(); reader.onloadend = function () { globalDataUrl = reader.result; // Stocke le Data URL dans la...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’,...DIVI, Snippets
/***************** MEOBILE MENU *****************/ .mobile_menu_bar::before { color: #ffffff !important; } /* Text left of hamburger in the Theme Builder */ .et_mobile_nav_menu:before { content: ‘MENU’; position: absolute; right: 40px; margin-top:5px;...php, Snippets, WP
Place ce fichier dans le répertoire racine de ton installation WordPress. Accède au fichier via ton navigateur (par exemple, http://tonsite.com/update_image_alt.php). Après l’exécution du script, tu peux retirer le fichier update_image_alt.php de ton site, car...