I made a Super Mario Themed Nursery

Last year, before the birth of my first son, I was able to get creative and decorate the nursery. Being a huge fan of video games (and retro style graphics!) logically I chose a Super Mario theme for the room and set about making plans to create a large wall mural and other themed objects (as well as doing the boring adult stuff like flooring and painting the walls).

It took approximately 2 months to get everything completed, and a lot of that was lead time on the custom things I needed to order. I do wish I took more shots during the build, but alas I didn’t think I’d be blogging about it. Maybe next time!

The first thing I built were some customised LIXHULT wall cabinets from Ikea. These conveniently come in yellow if you can get them. Using a combination of masking tape, acrylic paints, and stick on squares I created rows of pixels to add details and shading based on sprites from Super Mario World.

The next thing I built was a warp pipe cabinet which took a little more time and effort. I screwed together 3 Ikea EKET units to form a pipe-like shape and then applied several base coats of green. It took a lot of paint to cover these units effectively.

After that, I did some math to work out how large the ‘pixels’ needed to be, then used masking tape to paint on rows of colour using acrylic paint and Mario sprites for reference. I finished it off with some clear varnish to protect the paint work!

One of the last things I made (well, to be fair I only cropped some images for it) was a custom rug. I found a website called Bags of Love which do custom prints on various objects. I sent them a large image showing the map from Super Mario World and they did the rest.

It’s actually quite nice quality, and so far, touch wood, nothing has been spilled/puked/pooped on it but I know it’s only a matter of time. ūüí©ūü§¶‚Äć‚ôāÔłŹ

Creating a large mural was probably the most difficult and time consuming thing I had to do. To start on the design, I found a bunch of sprite sets on the web and created a document in Sketch where I was able to move the tiles/sprites around in a grid to form a scene.

The 16-bit sprites were obviously very small and would need to be scaled up to work as a wall mural so I calculated how big I wanted each pixel to appear on the wall and did some math to work out how many pixels across I would need to make the canvas to fill the entire wall once scaled up.

I believe to keep things simple, and to keep the mural to scale with the furniture I made, it worked out as being around 1.5cm per pixel.

To save myself some time and lower the costs, I hand-painted clouds on blue walls, and then planned on overlay all the characters and other graphics on top, either painting or sticking them on.

I was slightly over-ambitious with my first plan. I intended to create the entire design using small stick-on squares to make pixels, like a mosaic, but after testing this out on some smaller elements it was simply too time consuming.

It did work out quite nicely on the coins and clouds though which were made with hundreds of sticky squares from some website I have since forgotten.

Abandoning that plan, I found an alternative; large wall stickers printed by Sticker Mule. Large sizes are not cheap, and annoyingly their maximum sizes were not quite large enough to fit the entire wall, so I ended up needing to split my design into two pieces. The support folks at Sticker Mule were pretty helpful though, and helped ensure the printed murals were scaled to the same size and would line up edge-to-edge.

I scaled the images up to meet the minimum size/DPI requirements and ordered the prints. The images were massive, ~25,000px x 17,000px and 8mb. I made the fans run on the macbook that day!

Tip: All the image editors on mac did not scale images up well without blurring my beautiful pixels. The only app capable of doing the job was Gimp which kept those pixels square and clean. Not bad for open-source!

The stickers came in tubes, and although they had white borders (which were semi-hidden by the clouds I painted), they did manage to print to the edge where they joined so I didn’t have to cut them down by hand, and the join was more or less seamless.

View this post on Instagram

More mario room progress! #supermario

A post shared by Mike Jolley (@mikejolley86) on

To finish things up, we got a few Mario accessories for the room including this cloud lamp from Etsy, some pillows also from Etsy, various figures and plushies from Nintendo, and some team mates at Automattic were kind enough to gift us an awesome mushroom lamp which finished the decor off nicely.

Overall it was a fun project and it’s always nice to do creative/hands-on things every once in a while to have a break from coding. I sure hope Dexter is a Mario fan, otherwise we may need to swap rooms ūüėé

Obvious disclaimer, SUPER MARIO BROS. is a trademark of Nintendo of America Inc. and has nothing to do me, this project, or this website.

How we’re tackling GDPR in WooCommerce core

What we’re up to in WooCommerce land right now.

Develop WooCommerce

Stronger rules on data protection from May 2018 mean citizens have more control over their data.

GDPR is coming, and we’re working hard to get new tools in WooCommerce core to help store owners comply. If you’re not familiar with GDPR yet, Hannah wrote a great introduction to GDPR on the main WooCommerce blog which you can read to get caught up.

It‚Äôs important to note that this new law doesn‚Äôt just apply to stores in the EU ‚Äď this applies globally to stores that sell products to EU residents.

We’re currently building new tools into our upcoming 3.4 release to help store owners deal with GDPR requests and surface things such as privacy policies on the checkout. Some of the tools are built already, or are in progress, notably:

View original post 697 more words

Debugging “unexpected token” in WooCommerce 2.4+

When the WooCommerce checkout is processed it requires that gateways return an array (which is then converted into JSON) telling the checkout¬†whether or not it was successful. It’s been this way since v1. Here is a basic example from the PayPal gateway:

return array(
    'result'   => 'success',
    'redirect' => $paypal_request->get_request_url( $order, $this->testmode )
);

The above for example returns a successful response and tells the checkout to redirect the user to the URL provided.

In 2.4+ this was made more strict in that the response must be valid JSON. Anything else in the response (such as HTML, notices or whitespace) will invalidate this JSON and you may see an error along the lines of:

SyntaxError: Unexpected token

WooThemes own gateways have all been tested for 2.4, however, we’ve seen some less-supported gateways break due to returning invalid content.

I’ve seen a few vocal users complaining about this recently on the forums (some even feeling the need to attack me personally, thanks guys) and thought it best to post a few steps on how you can narrow down the issue.

First off its always best to rule out your plugins and theme by disabling them, even though a lot of users seem to ignore this step. It is only temporary and helps narrow down the issue. Much better than shouting at me on WordPress.org.

Lets assume this does not narrow down the issue for a moment. How would you know if content is being output? The answer is in your browser console.

Lets simulate an error. In the paypal gateway, just before the array is returned I’ll add:

trigger_error( 'Uh oh' );

This triggers the error as expected:

2015-11-12 at 16.29

Now lets try to debug this like someone who does not know where the error is coming from.

In Chrome, go to View > Developer > Javascript Console whilst viewing the checkout.

Now trigger the error again.

After the error is shown, in the console go to the Network tab and click XHR:

2015-11-12 at 16.31

In the list you’re see one which looks like this: ?wc-ajax=checkout. Click on that and go to the response tab:

2015-11-12 at 16.32

Notice in my above example, there is the notice. This invalidates the JSON.

A valid JSON response {starts and ends with a bracket} – if there is an error, white space or content before or after those brackets, that is your issue.

In some cases the error will be obvious and allow you to patch or disable the cause.

Hopefully that helps.

On joining Automattic

By now you’ve probably heard¬†the news that Automattic (A8c) acquired WooThemes, where I was working as a developer for 3 years.¬†July¬†1st I¬†officially became an Automattician.

blog_woomattic_v2@2x

The weeks leading up to the acquisition were surreal; full of questions, a few awkward moments (it was top secret after all) but exciting nevertheless, and I was happy to be invited along with several others to New York to meet fellow Automatticians and be there for that bombshell of an announcement.

If acquisition were¬†inevitable, I’m¬†genuinely¬†relieved that¬†it was Automattic showing the interest. WooThemes and Automattic are very similar culturally and have similar aspirations. I know the team and products are going to be well looked after, and all the¬†people I have¬†met so far from A8c have been¬†really friendly.¬†So far my day to day activities have changed very little and everything feels completely natural.

The only challenge for me personally in this transition was parting ways with a side project/business of mine; WP Job Manager. This was a highly successful (and profitable) project with a user base 30k strong which I enjoyed working on in my spare time. Brian Krogsgard covered the story on poststatus.com in depth back in June and explained;

Automattic has a strict policy that employees cannot have paid side projects, whether client or product work. For Mike to stay at Automattic, he had to figure out what the future of WP Job Manager would be.

A8c expressed interest in acquiring the plugin and we came to an agreement which was a huge relief for me as I wanted to ensure whomever took over would actually look after the plugin and its users.

Anything was an option, including making WPJM free or selling it to a third party, but I’m glad we came to the solution we did. Since WPJM is part of Automattic now there’s no real or perceived conflict to the continuing work on it or revenue from it.

– Matt Mullenweg

Backed by A8c I think the project has a bright future. I’m still working on the dev side and¬†I imagine more hands will be added in the coming months to keep things moving.

Looking ahead, I’m excited to continue and focus my attention¬†on¬†WooCommerce. Up until now we’ve had¬†a tiny team (of ~4 developers) and it’s done fantastically¬†well, but¬†with more resources and people at our disposal who knows what we can achieve. We’ve already had some new people come over on rotation and its great to get fresh eyes on all of the projects and extensions.

Overall, I think that my move to Automattic, and consequential¬†winding down of side projects, is going to have a positive impact on my life in general. I already have more free time, and things will be even better¬†now that I don’t need¬†to deal with tedious accounting and VAT returns for my businesses. I was even able to enjoy a vacation without the worry of supporting my products which I’ve not been able to do for years. It felt¬†great.

And of course I may be able to blog a little more often ūüôā

p.s.¬†Please¬†consider working with¬†us¬†– we’re always looking for talented devs and support staff!

Handling EU VAT on WPJobManager.com with WooCommerce

eu

Ah the EU. Always with their bright ideas. If you haven’t heard about the upcoming changes surrounding EU VAT, first off, where have you been hiding?

To put it simply, essentially they require everyone selling digital products to customers in the EU to charge EU Tax based on the customer location, regardless of where your business is based. You can read more about the changes in the blog post I wrote on WooThemes.com here.

Being based in the UK, and selling plugins on WPJobManager.com, I am affected by these changes and so I’ve been doing a lot of research, speaking to accountants, and preparing my site for the changes.

In this post I’ll explain what I’m doing and hopefully this may give you some ideas/resources if you’re struggling with compliance.

Continue reading

Parting Ways with the Download Monitor Plugin

Download Monitor is old. Around 8 years old in fact and was one of the first plugins I made for WordPress, back in the time before custom post types and all the other luxuries developers enjoy today.

It has been rewritten 4 times, seen well over 100 releases, and been downloaded 600,000 times. The latest ‚Äėv1‚Äô reboot has been praised and I often receive nice comments from users even though development has slowed of late.

But but therein lies the problem; time. The biggest, most exciting projects I’m working on (WP Job Manager, and WooCommerce at Woothemes) take up most of my time, so without sleeping at my desk I don’t have sufficient time to maintain and grow the plugin.

So rather than let it die a slow and neglected death, I’ve taken the difficult decision to abandon the project.

But Don’t Worry, It’s Being Adopted

He is dead serious about development, honest
He is dead serious about development, honest

Developer Barry Kooij (previously with Yoast and now a coworker at Woo) will be taking over the development of the plugin going forward.

The repositories have been transfered and work has already begun on the next version, so it looks like the plugin will be going for a few more years after all. Good luck to him!

With Download Monitor off of my plate, I can now focus on my other projects which are really taking off in a big way and demanding more of my focus. I’m really excited about it’s future, and I’m happy that Download Monitor is in safe hands.