Archives: Snippets
WWOF – Force Default Quantity to 0 and Auto-tick the Add to Cart Checkbox
/** * WWOF v3 (Ant Design Vue): Force default qty to 0 and auto-tick the Add to Cart checkbox * (Supports both manual typing and up/down arrow clicks) */ add_action( ‘wp_footer’, ‘wwof_v3_antdesign_qty_checkbox_script_final’, 999 ); function wwof_v3_antdesign_qty_checkbox_script_final() { ?>Continue reading
Untitled Snippet
Untitled Snippet
BMDrama
ANDRITZ Navigation Panels
document.addEventListener(“DOMContentLoaded”, function () { const triggers = document.querySelectorAll(“.bp-andritz-utility”); const panels = document.querySelectorAll(“.bp-andritz-panel”); const closes = document.querySelectorAll(“.bp-andritz-close”); const backs = document.querySelectorAll(“.bp-andritz-back”); function closeAllPanels(){ panels.forEach(panel => panel.classList.remove(“bp-open”)); document.body.classList.remove(“bp-andritz-active”); } triggers.forEach(trigger=>{ trigger.addEventListener(“click”,function(){ const target = document.getElementById(this.dataset.target); const isOpen = target && target.classList.contains(“bp-open”); closeAllPanels();…Continue reading
Untitled Snippet
FACEBOOK PIXELS PRO
Exclude Specific Products from Parent Category
/** * Exclude specific products from appearing in their parent category. */ add_action(‘woocommerce_product_query’, ‘exclude_specific_products_from_parent_category’); function exclude_specific_products_from_parent_category($q) { // Only apply this on the parent category archive page if (!is_product_category(‘telt-og-pavilloner’)) { // Replace with your parent category slug return; } //…Continue reading