• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
SnippetPress

SnippetPress

The Home of WordPress Snippets

Vultr Web Hosting
  • Cheat Sheets
  • Reviews
  • Snippets
  • Tutorials

Snippets

Rename a Country in WooCommerce

June 18, 2020 by SnippetPress Leave a Comment

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

How to Modify Text in a WordPress Plugin or Theme Without Another Plugin

June 17, 2020 by SnippetPress Leave a Comment

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

June 16, 2020 by SnippetPress Leave a Comment

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

June 15, 2020 by SnippetPress Leave a Comment

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

June 12, 2020 by SnippetPress Leave a Comment

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

« Previous Page
Next Page »

Primary Sidebar

E-mail Newsletter

More to See

WooCommerce – Prevent Product Being Added To Cart If A Specific Product Is Already In Cart

July 15, 2020 By SnippetPress

WooCommerce – Display an “Add $X To Get Free Shipping” Notice

July 13, 2020 By SnippetPress

Footer

Recent

  • Change The WordPress Page Title Separator Without A Plugin
  • WooCommerce – Prevent Product Being Added To Cart If A Specific Product Is Already In Cart
  • WooCommerce – Display an “Add $X To Get Free Shipping” Notice
  • WooCommerce – Integrate Google Merchant Center Customer Reviews
  • WooCommerce – Disable Out of Stock Variations

Search

Copyright © 2023 ·SnippetPress