debugging woocommerce - wooconf talk

24
Debugging WooCommerce Andrew Wikel WooCommerce Ninja @slash1andy

Upload: andrew-wikel

Post on 18-Feb-2017

337 views

Category:

Software


0 download

TRANSCRIPT

Debugging WooCommerce

Andrew WikelWooCommerce Ninja

@slash1andy

- Robert Burns

“…The best-laid schemes o' mice an ‘men…”

Debugging

WooCommerce is awesome

Customizing WooCommerce using actions and filters, or just adding plugins or themes, is a great way to provide a tailored solution for your exact needs, but sometimes things can go haywire.

- Lord Melbourne

“…the possession of great power necessarily implies great

responsibility.”

Your face when your site white screens

It’s going to be OK. Breathe.

Calm

Your first instinct will be to panic, but you’re not doing anyone favors with that.

Find the problemIt’s often buried *just* under the surface

Questions to ask• When exactly did you first notice the problem?

• Have any updates been applied to your website recently?

• Have you changed themes or made any design changes?

• Have you installed any new plugins?

• Is your problem happening in one browser, or all of them?

• Do you see any specific error messages?

Sometimes the problem is right here.

Cheating, the WooCommerce wayWe’ve built a fancy tool for you (really for us, but you can use it). It’s called the System Status Report, and you’ve likely seen it in the WooCommerce menu.

Things to look for

• Anything in red, which means a problem.

• If you’re using an old version of a plugin from us, it will tell you.

• It will tell you the template overrides you are using in your theme.

Still not seeing anything?• Go to the page and use Firebug/Chrome Dev

tools to look for anything out of the ordinary.

• Use the built in logging for WooCommerce extensions that have it. This can help you narrow down certain issues with payments or shipping.

• WP_DEBUG

Fix the problemGet to it!

Don’t do any of this live

• Make sure you have a backup of your site

• Perform all debugging (and updates and everything else) on a staging site.

Undo how you broke it

• If you did something to break it, undo it

• This is why you should have a backup to roll back to (if an update went awry, or your theme has outdated templates, etc.)

Start in a vacuum

• Deactivate everything (all plugins except the one that you have the issue with)

• Change the theme to Storefront

• Try to break it again

If it works

• Start reactivating plugins/theme until you find the culprit, and leave that deactivated while you contact the dev, etc.

If it doesn’t

• Try the exact setup on a completely different site to narrow it down to server configurations

Google

• It’s not cheating. It’s how I know 95% of what I do.

Still no?

• Call in the big guns: Your developer/Woo Expert/ WooCommerce Support

Resources to remember

• WooCommerce Documentation

• Woo Experts

• Advanced WooCommerce

• WooCommerce Troubleshooting 101

Thanks@slash1andy

automattic.com