|

Woocommerce Free Shipping default selection

When entering a coupon code for Free Shipping, the Free shipping option is not selected by default. A quick solution is to add a function that disables all other shipping options, leaving Free Shipping as the only available option. Add this snippet to your functions file. It hides everything but free_shipping if it’s available and…

|

iOS specific CSS

To target iOS specific devices: @supports (-webkit-overflow-scrolling: touch) { /* CSS specific to iOS devices */ } @supports not (-webkit-overflow-scrolling: touch) { /* CSS for other than iOS devices */ } It works because only Safari Mobile implements -webkit-overflow-scrolling: https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-overflow-scrolling I used this because a WordPress Genesis responsive menu had some icon alignment discrepancies on iPhone only. Here is…

Woocommerce Logged in Only

Restrict Woocommerce pages to logged in usesrs only: /****************** Logged in Only *************************/ function woo_loggedin_redirect() { if ( ! is_user_logged_in() && (is_woocommerce() || is_cart() || is_checkout()) ) { // feel free to customize the following line to suit your needs wp_redirect(home_url()); exit; } } add_action(‘woo-loggedin_redirect’, ‘woo_loggedin_redirect’);