Code My Own Road Programming The Web For Profit Fri, 11 Apr 2014 04:24:56 +0000 en-US hourly 1 How To Remove The WooThemes Updater Notice Tue, 10 Dec 2013 21:40:24 +0000 If there’s one thing that ticks me off it’s plugins that add notices to your WordPress admin area that cannot be dismissed.

WooThemes do it with a lot of their extensions including WooCommerce essentially advertising their WooThemes updater plugin.

So here’s a neat little snippet of code that you can drop into your functions.php to hide those annoying Woo Updater notices:

remove_action( 'admin_notices', 'woothemes_updater_notice' );

And viola, no more updater notice. Take that immovable little yellow box!

]]> 2
Bluehost is running a big Thanksgiving & Black Friday sale Wed, 27 Nov 2013 21:18:11 +0000 Bluehost Black FridayIf you’re in the market for some cheap but still good quality hosting then you should checkout what Bluehost are doing.

The deal is $3.95 per month and then they also have a 50% discount on all add-ons sitewide so you can really save quite a bit of money.

>> Click here to claim the deal <<

We did a review on the Pro hosting account a while back and it’s been very popular. Click here to read that.

Happy thanksgiving and whatnot :) Hope you make the most of the holiday season.

]]> 0
Turn Off URL Monitoring In Redirection WordPress Plugin When Using WooCommerce Thu, 22 Aug 2013 02:20:30 +0000 This is a public service announcement for users of WooCommerce and the Redirection plugin. Your product pages could be redirecting visitors to the home page.

I potentially just lost hundreds of dollars in sales due to a clash between these plugins.

There’s an option squirrelled away in the bowels of the Redirection plugin to have it automatically created 301 redirects based on if you’ve modified a page or post. I’m not sure why but it is also doing it with WooCommerce products as well.

Here’s the thing…


I wrote that in caps because I’m effing pissed off that I didn’t notice this earlier and for most of the month (or longer) the Redirection plugin has dutifully been redirecting people from several of my add-on product pages on ThirstyAffiliates to the home page.

Here’s what the option looks like, you’ll find it under the Options page which you can get to by clicking on Tools->Redirection and clicking Options in the list of links up the top.

Turn Off URL Monitoring In Redirection

According to the stats it gives me it only redirected a few hundred people so it seems to have picked this up fairly recently (like in the last month) and thank god it was on some of the less popular add-ons.

Still, given the conversion rates I’m used to on these pages this could potentially be worth several hundred dollars.

So don’t make my mistake, turn off the URL monitoring in Redirection if you want it to play nice with WooCommerce.

]]> 6
How To Remove Digg Digg Floating Share Bar From WooCommerce Products Sun, 28 Jul 2013 23:00:40 +0000 How To Remove Digg Digg From WooCommerce ProductsI love the Digg Digg social sharing plugin for WordPress and put it on just about every site that I build (including this one).

It floats nicely down the page and is such a slick looking way to get people to interact with your blog posts on social media.

But there’s a couple of shortcomings with the plugin and the guys from Buffer (who now own the plugin) obviously don’t have a boat load of extra time dedicated to fixing them.

One such shortcoming is that it doesn’t handle custom post types very well, in particular for me the main annoyance was having Digg Digg’s floating share bar show on all WooCommerce product pages.

I came up with this short code snippet to get it to stop showing on any WooCommerce related page, feel free to use it in your functions.php:

function dd_exclude_from_woocommerce() {
	if(is_woocommerce()) {
		remove_filter('the_excerpt', 'dd_hook_wp_content');
		remove_filter('the_content', 'dd_hook_wp_content');
add_action('template_redirect', 'dd_exclude_from_woocommerce');
]]> 4
How To Change The PayPal Icon In WooCommerce Tue, 23 Jul 2013 23:00:08 +0000 WooCommerceHere’s a quick tutorial that might help you increase conversions on your WooCommerce shopping cart.

If you’re using PayPal as the payment gateway (like many people do, including myself), then you’re likely to have noticed the dodgy little icon displayed on the cart.

This is a great place to put a more informative icon that shows just how many payment options you can process with PayPal. Many people aren’t even aware that you can process credit cards using PayPal and might completely abandon your cart if you don’t show them the right credit card symbols.

I put together the following graphic and code snippet which you can use on your WooCommerce checkout.

Here’s the new icon image we’ll be using which includes all the credit cards that PayPal accepts (right click and save):


Make sure you keep the naming of the file consistent with the following code snippet. For tidyness I’ve placed this image in my theme’s directory under a subdirectory called “images”, if you’re using the following code verbatim you’ll want to do the same.

Copy and paste the following code into your functions.php:

function replacePayPalIcon($iconUrl) {
	return get_bloginfo('stylesheet_directory') . '/images/acceptedCards.png';
add_filter('woocommerce_paypal_icon', 'replacePayPalIcon');

Now take a look at your new and improved cart with it’s sexy little credit card icons. If this code snippet helped you out let me know in the comments.

]]> 20
ThirstyAffiliates Now Available On Thu, 18 Jul 2013 23:15:54 +0000 ThirstyAffiliatesFor those that don’t know or are new to this blog a couple of years ago I developed and launch a premium plugin aimed at affiliate marketers called ThirstyAffiliates.

ThirstyAffiliates basically lets affiliate marketers using the WordPress platform manage all their affiliate links from a central location which aids in updating links, organising them into categories and various other things like importing and exporting between blogs.

For the past two years or so it’s been a 100% paid solution and something that has sold fairly well for me given I was spending max about an hour on it a week (mostly doing support).

In short it’s been in maintenance mode, that is until now.

If you’ve been following along with some of my recent posts on this blog you’ll see that I’ve been doing a lot of “how to” style posts giving little snippets of code for dealing with WooCommerce (amongst other things).

That’s because behind the scenes we have been ramping up to a relaunch of the ThirstyAffiliates website and releasing the plugin on and all of that happened on Monday.

Why release it on

A while back in an effort to add value to the core plugin and to create some higher priced plans I created a number of “add-ons” to ThirstyAffiliates which were essentially standalone plugins that hooked into the feature set of the plugin and extended it.

These add-ons proved to be very popular and upped our sales significantly while allowing us to compete with other similar premium plugins on the market.

I was doing some brainstorming earlier this year thinking of ways to increase the potential of the business and the idea caught on that we should re-evaluate how we “sold” the plugin.

Essentially all the value is in the add-ons so I decided that rather than keep selling the core plugin we’ll expand the user base, get more people interested and provide them with ways to bolt on extra functionality.

With the old business model, I could only make so many permutations of pricing plans and add-on packs before it would start to get overwhelming. Selling the add-ons by themselvesĀ is much more flexible.

So, the main two reasons behind the move:

  1. It doesn’t restrict how many add-ons we can make (I have some really great ideas brewing for new ones and we plan to release 1 per month)
  2. And more importantly, it doesn’t restrict revenue potential in the future and will encourage people to buy from us again and again as we release new add-ons.

Where can you get ThirstyAffiliates?

You can either goto the main site or grab the plugin directly from WordPress. It’s proving to be quite popular already and we’ve had a warm reception from the community.

Of course I’m still working out the kinks in my sales system and business model for that matter, but the early days and success I’ve seen this week is promising.

If you are using the plugin already or have downloaded it and enjoy it I’d really appreciate a 5-star review on the plugin page.

]]> 0
How To Add Currency Code As Suffix To Prices In WooCommerce Mon, 15 Jul 2013 04:52:05 +0000 WooCommerceIf you’re looking for a way to modify the price so that your currency code becomes a suffix to your prices in WooCommerce you’ve come to the right code snippet tutorial.

I’m going to show you how to make prices that look like this:


Into this:

$49 AUD

When I was relaunching my site for ThirstyAffiliates we brought the shopping cart experience home with WooCommerce.

During the process I changed my pricing to AUD (Australian Dollars) but because the currency symbol ($) is the same as USD I thought it might cause some confusion if the first place they saw AUD was in PayPal when they got through to process their payment.

I’ve written previously about changing the currency symbol in WooCommerce to include your currency code, but it leaves the prices looking a little unnatural like this “AUD$49″.

The first step is easy enough, create a function to filter the price format in WooCommerce.

WooCommerce makes this ridiculously easy with it’s ample hooks and filters API, we just jump into the “woocommerce_price_format” action.

Here’s the code snippet which will add the suffix to all your prices throughout the site (copy and paste into your functions.php):

function addPriceSuffix($format, $currency_pos) {
	switch ( $currency_pos ) {
		case 'left' :
			$currency = get_woocommerce_currency();
			$format = '%1$s%2$s&nbsp;' . $currency;
	return $format;
add_action('woocommerce_price_format', 'addPriceSuffix', 1, 2);

I also wanted the ability to just show the currency code suffix on prices in the cart and checkout pages, leaving my product pages and listings all unaffected.

To do this you need to wrap this add_action with another function that only gets called on those pages.

We use two new actions to call our function to add the action for modifying the price format. Tricky stuff!

Here’s the full code snippet for restricting the formatting to cart and checkout (copy and paste into your functions.php):

function addPriceSuffix($format, $currency_pos) {
	switch ( $currency_pos ) {
		case 'left' :
			$currency = get_woocommerce_currency();
			$format = '%1$s%2$s&nbsp;' . $currency;
	return $format;
function addPriceSuffixAction() {
	add_action('woocommerce_price_format', 'addPriceSuffix', 1, 2);
add_action('woocommerce_before_cart', 'addPriceSuffixAction');
add_action('woocommerce_review_order_before_order_total', 'addPriceSuffixAction');

Hope this helps you, if it does feel free to leave a comment :)

]]> 11
How To Change the Price Of $0 Items To ‘FREE’ In WooCommerce Tue, 09 Jul 2013 23:00:26 +0000 WooCommerceIf you are using WooCommerce (which has fast become my E-Commerce plugin of choice for WordPress), then sometimes you’ll run into the issue where you want to use the word “FREE” as the price when a product is $0.

I ran into this issue recently because I’ll probably be looking at including some free add-ons to ThirstyAffiliates eventually and wanted to make sure the templates would look proper when the price was set to 0.

I came up with this little snippet of code that you can just drop into your functions.php file in your theme. You’ll need WooCommerce installed as well, of course.

add_filter('woocommerce_free_price_html', 'changeFreePriceNotice', 10, 2);
function changeFreePriceNotice($price, $product) {
	return 'FREE';

Hope this helps if you’re looking to do the same and have your prices show as “FREE” instead of an ugly $0.

]]> 6