WordPress, Workflow Tools

xmllint

I recently discovered after trying to import WordPress XML files for a customer that you can use xmllint (within the Command Line or iTerm) to check the validity of the files.

The error message looked like this:

Invalid XML on read in WXR_Large_File_Parser::__construct() for file:///nfs/6a2/156107206/files/2019/01/site-address-here.wordpress.2019-01-09.001.xml_-3.txt (size: 11335507)

After a colleague suggested xmllint, I opened iTerm (equivalent to the Command Line), then made sure to change the directory to where the file were located. For example:

/cd ~/Desktop
xmllint --valid filename.xml

Two files were checked and one of the files produced the following error:

If anyone can translate the error messages (from the screenshot), please let me know!

In the end, I tried the import file again but decided to split the first file 11.3 MB using a WXR splitter and all files were successfully imported. 🎉 ðŸ¤“

Standard
WooCommerce

Creating WooCommerce pages

It’s been quite a number of months since my last blog post and it’s now January, 2019! plus I wanted to try out the new WordPress Editor 🤓

As Happiness Engineer’s, we have the opportunity to temporarily rotate to another sub-division (or team) for around three months (my rotation ended last December). It was challenging and fun at the same time and for me, I was on Team Tatooine that provides support specifically for WooCommerce customers.

There were quite a number of TIL’s (Today I Learned) throughout the three months but for now, I’d like to share a few ways on how to create the necessary WooCommerce pages (eg. Shop, Cart, Checkout) on your WordPress site.

Setup wizard

If you happen to skip over the Wizard Setup (after installing and activating WooCommerce), you can re-run the Wizard as seen here:

To access the Setup wizard, navigate to WooCommerce > Settings then click on ‘Screen Options‘ located on the top right corner of the page screen, then click ‘Setup wizard‘.

Tools > Create pages

Another way, is to let WooCommerce create those pages for you via WooCommerce > Status > Tools then click on ‘Create pages‘ as seen below:

Shortcodes

Or lastly, you can manually create your WooCommerce pages by using the following shortcodes on separate pages:

[woocommerce_cart] – shows the cart page
[woocommerce_checkout] – shows the checkout page
[woocommerce_my_account] – shows the user account page
[woocommerce_order_tracking] – shows the order tracking form

Keep in mind, you’ll want to create a ‘Shop’ page first then assign your ‘Shop’ page within WooCommerce > Settings > Products (General tab) as seen below:

Standard
Automattic
Automattic, WordPress

Howdy Automattic!

Just a quick note to share the news that yesterday was my first official day as a Happiness Engineer for Automattic. The awesome company behind WordPress, Jetpack, Akismet and a whole bunch of cool products.

As many of you know, I’ve always been a huge fan of WordPress so after working at Sydney University for 12 years, let the new adventures begin…

Standard
Personal

JavaScript Goals for 2017

I thought I’d share what I recently watched that inspires me.

Jennifer De Walt shares her experiences (at JS Conference 2014) of how she learned to code by creating 180 websites in 180 days. It’s inspirational to see how she shares her successes and failures with the audience. Jennifer also mentions that with every site she creates, it is accompanied by a blog post (for each day) and the code is in a GitHub repository. In the past, I’ve tried to demonstrate what I’ve learned using CodePen in addition with GitHub.

As a result, I’ve decided I really want to learn more about JavaScript before delving deeper into jQuery. There are many posts that debate which to learn first. Below are a few examples;

As much as I love to copy and paste jQuery scripts, I would like to gain a better understanding of the fundamental reasons of why I should be coding in a certain way and to know the background of what I’m doing instead of merely copying and pasting scripts (Thank you Stack Overflow!)

Another reason to learn JavaScript was that, Matt Mullenweg (CEO and Founding Developer of WordPress) recently made this comment at the 2015 State of Word Conference, “learn JavaScript, deeply”.

What do you want to learn today?

Standard