WooCommerce: How to Remove the Order Notes Field on Checkout

In WooCommerce, an optional “Order Notes” field is generally shown at the bottom of the checkout page.

You can easily remove this field using a plugin or with custom code.

Remove with a Plugin

The free plugin Checkout Field Editor (Checkout Manager) for WooCommerce allows you to edit, remove or add fields in the checkout form.

  1. Install the plugin
  2. Go to the settings page for the plugin
  3. Go to the “Additional Fields” section
  4. Select the “order_comments” field and click “Remove”
  5. Click “Save Changes”
Checkout Field Editor Plugin

Remove with Code

Here’s the code snippet to remove the order notes field from checkout:

/**
 * Remove the order field from checkout.
 */
function devpress_remove_checkout_phone_field( $fields ) {
	unset( $fields['order']['order_comments'] );
	return $fields;
}
add_filter( 'woocommerce_checkout_fields', 'devpress_remove_checkout_phone_field' );

There’s also an alternate method, which is just a one line filter:

add_filter( 'woocommerce_enable_order_notes_field', '__return_false', 9999 );

WooCommerce: How to Remove the Phone Number Field on Checkout

If a customer’s phone number is not required for orders or support, removing the phone number field is a great way to simplify the checkout form.

You can either do this with code or a plugin, depending on what you are more comfortable with.

Remove with a Plugin

The free plugin Checkout Field Editor (Checkout Manager) for WooCommerce allows you to edit, remove or add fields to the checkout form.

  1. Install the plugin
  2. Go to the settings page for the plugin
  3. Select the “billing_phone” field and click “Remove”
  4. Click “Save Changes”
Checkout Field Editor Plugin

Remove with Code

Here’s the code snippet to remove the billing phone number field from checkout:

/**
 * Remove the phone number field from checkout.
 */
function devpress_remove_checkout_phone_field( $fields ) {
	unset( $fields['billing']['billing_phone'] );
	return $fields;
}
add_filter( 'woocommerce_checkout_fields', 'devpress_remove_checkout_phone_field' );

Code Snippet: Remove the Cart from the Storefront Theme Header

The cart is hooked in using the storefront_header action. To remove it:

/**
 * Remove the cart from the theme header.
 */
function prefix_storefront_mods() {
    remove_action( 'storefront_header', 'storefront_header_cart', 60 );
}
add_action( 'init', 'prefix_storefront_mods' );

If you’d like to remove it from just the home page (or other specific pages), you can use a conditional statement:

function prefix_storefront_mods() {
	if ( is_front_page() ) {
    	remove_action( 'storefront_header', 'storefront_header_cart', 60 );
	}
}
add_action( 'init', 'prefix_storefront_mods' );

Building an Author Website with WordPress

Every writer needs a website.

You might want to have a portfolio of your writing, feature short pieces on a blog, or connect with your fans.

In this post we will take a look at how you can build a simple author website using DevPress themes. In this particular example, we’re going to focus on the Luminate theme, but any of the other DevPress themes that feature at least one sidebar will work just as well.

Here’s an example of a simple author site using Luminate:

screenshot of sample site

Let’s look at how to put it together! Continue reading

Track your WordPress Site Visits with Google Analytics

Whether you’re a small business or a blogger, once you build a website you’ll want to know how much traffic you’re getting. This can help you better plan your marketing strategy, determine which of your web copy and call to action items are most successful, or convince companies to advertise on your site.

Even if you don’t know how you might use this data in the future, it’s a good idea to start tracking your site visits immediately upon building a website, or as soon as you can afterwards. That way you can start monitoring changes over time and see how much your site traffic grows along with your business.

Although there are lots of services that will allow you to track some of your site data, we at DevPress think the best, and most comprehensive, solution for the average website will be Google Analytics, a free data collection tool from Google. It can be modified to track pretty much any activity on a site, including page clicks, button clicks, and time spent on a page, and the great thing is, once you’ve set it up, it’s completely invisible to your visitors. Continue reading

Introducing Summit

screenshot

Summit is a simple one-column WordPress theme, perfect for blogging and small business. It features large header images and a number of customizable display options. Social icons can be added to the header. A customizable widget area is available in the footer. Summit is also responsive and looks great on desktop and mobile devices. I encourage you to check out the demo to see how it looks. Continue reading

DevPress Announcement

Around four years ago, DevPress.com started with four founders. Due to a case of too many Chiefs and not enough Indians, the team didn’t mesh well and the site never got traction. For a short time, DevPress was dying and members were left hanging so I offered to take over. On my own with DevPress, I found some success here and there. There were high times (like DevPress’s partnership with AlienWP.com), but also low times. Through thick and thin I stuck by until recently I had to let go.

Last weekend, I held an auction to sell DevPress due to my wife’s mounting medical bills and lack of time to manage DevPress properly for the last few months. After posting the auction online, I reached out to a few individuals in the WordPress community to seek help finding a buyer. Within 24 hours, someone made a bid to end the auction.

I jumped at accepting the bid because I instantly recognized who it was from and is familiar with his work. More bids and offers came in as news of the auction started spreading, but I honored the first accepted bid because I felt it would be the perfect fit for DevPress going forward. Continue reading