Make price in WooCommerce an absolute value

Woocommerce Trim Price

You can make the prices displayed in WooCommerce an absolute value and remove the decimal .00 places with the WooCommerce woocommerce_price_trim_zeros filter. So for example to go from $50.00 to $50 In your functions.php add the following… /** * WooCommerce * Trim zeros in price decimals **/ add_filter( ‘woocommerce_price_trim_zeros’, ‘__return_true’ );

Read More

Change the WooCommerce return to shop and continue shopping URLs

woocommerce-shop-page

You can change the WooCommerce shop URL with a filter that WooCommerce provides, this can be helpful especially if you have a one product based shop and you want your users to return to that product and not the default shop page URL. The filter to use is aptly named – woocommerce_return_to_shop_redirect – add in your…

Read More

Remove WordPress site health dashboard and menu item

Wordpress Site Health

You can remove the WordPress site health dashboard widget and menu item with the following snippets Remove Site Health Dashboard Widget add_action(‘wp_dashboard_setup’, ‘themeprefix_remove_dashboard_widget’ ); /** * Remove Site Health Dashboard Widget * */ function themeprefix_remove_dashboard_widget() { remove_meta_box( ‘dashboard_site_health’, ‘dashboard’, ‘normal’ ); } Remove Site Health Menu Item add_action( ‘admin_menu’, ‘remove_site_health_menu’ ); /** * Remove Site…

Read More

Adding a Site Login/Logout Link to an existing Menu in WordPress

Add Login Logut To Menu

You can add on to the end of an existing WordPress menu a site login/logout link. The WordPress menu must be registered and have a theme location, this will not work with custom menus. This needs to be added to your theme functions.php file add_filter( ‘wp_nav_menu_items’, ‘themeprefix_login_logout_link’, 10, 2 ); function themeprefix_login_logout_link( $items, $args ) { if(…

Read More