If you would like to rename a country in WooCommerce, it's as simple as adding a code snippet to your site. The following example changes "Ireland" to "Republic of Ireland": add_filter( 'woocommerce_countries', 'snippetpress_rename_countries' ); function snippetpress_rename_countries( $countries ) { $countries['IE'] = 'Republic of Ireland'; return $countries; } The … [Read more...] about Rename a Country in WooCommerce
Snippets
How to Modify Text in a WordPress Plugin or Theme Without Another Plugin
We've all been there, you've found the perfect theme or plugin for your site, but the wording on that button just isn't right. Or maybe you need to change the word Cart to Basket in WooCommerce. Whatever it is, you've probably come across plugins that will change the text for you, but what if you want to do it without having to install another plugin? One thing's for certain … [Read more...] about How to Modify Text in a WordPress Plugin or Theme Without Another Plugin
Limit the WordPress Search to Specific Post Types
By default, WordPress will return all post types in its search results. If you need to limit the search results to specific post types, you can use the follwoing snippet: add_filter( 'pre_get_posts', 'snippetpress_search_post_type' ); function snippetpress_search_post_type( $query ) { $post_types = array( 'post', 'page', ); if ($query->is_search && … [Read more...] about Limit the WordPress Search to Specific Post Types
How to Exclude Specific Tags and Categories from WordPress Search Results
Sometimes there may be certain categories or tags that you don't want to appear in your WordPress search results. You could use a plugin to exclude posts that are in these categories or tags, or you could just add a little snippet to your site. Excluding Categories To exclude posts that are in a specific category from your WordPress search, simply use the following … [Read more...] about How to Exclude Specific Tags and Categories from WordPress Search Results
Auto-Complete WooCommerce Orders
By default, WooCommerce only auto-completes orders that contain only virtual downloadable products. All other orders must be manually marked as complete. However, if your store has a lot of orders that don't require any processing, having to manually complete lots of orders every day can become a very time consuming task! Luckily, WooCommerce provides a hook for you to use … [Read more...] about Auto-Complete WooCommerce Orders