button to toggle css styling / div visibility?

The getElementsByClassName, as the name suggests returns a collection of Elements, meaning an array, so x.style.display won’t work. x[0].style.display would work for the first element that it finds. But since this is WordPress, which by default loads Jquery, you could use: jQuery(‘.cart-multi-step-button-1’).click(function(){ jQuery(‘.cart_totals’).css({ ‘background’: ‘red’, ‘display’: ‘none’, }); }); You could also toggle a class … Read more

Product thumbnail size in catalog

Set the product thumbnail size and enforce whichever form of cropping gives you the consistency you’re looking for. This will let you set whatever width you prefer: <?php function wpse_307110_override_thumbnail_sizes() { $theme_support = get_theme_support( ‘woocommerce’ ); $theme_support = is_array( $theme_support ) ? $theme_support[0] : array(); // change 150 to whatever width you need $theme_support[‘thumbnail_image_width’] = … Read more