WooCommerce for Hosts

WooCommerce for Hosts

A presentation by myself and Andrew Wikel about WooCommerce from a hosting perspective.

D4398e14879a394a9feabd6871d6bbaa?s=128

Patrick Rauland

October 19, 2015
Tweet

Transcript

  1. WooCommerce by Patrick Rauland & Andrew Wikel https://speakerdeck.com/bftrick/woocommerce-for-hosts

  2. WooCommerce Basics

  3. None
  4. None
  5. None
  6. Custom Post Types • Products • Variable products • Shop

    orders
  7. Custom Tables • {prefix}_woocommerce_api_keys • {prefix}_woocommerce_attribute_taxonomies • {prefix}_woocommerce_downloadable_product_permissions • {prefix}_woocommerce_order_itemmeta

    • {prefix}_woocommerce_order_items • {prefix}_woocommerce_shipping_flat_rate_boxes • {prefix}_woocommerce_shipping_zones • {prefix}_woocommerce_shipping_zone_locations • {prefix}_woocommerce_shipping_zone_shipping_methods • {prefix}_woocommerce_tax_rates • {prefix}_woocommerce_tax_rate_locations • {prefix}_woocommerce_termmeta
  8. WooCommerce Architecture

  9. Plz Don’t Cache • Pages ◦ Cart page ◦ Checkout

    page ◦ wp-cron.php • Plugins with a bad history ◦ W3 Total Cache ◦ Don’t modify the Super Cache plugin
  10. Transients • When a user visits a store we geolocate

    the user, look up the relevant tax rates, and apply them to product if the tax rates are inclusive (ex. European pricing). • We store the product price including the tax as a transient • We display the product with the price to the user • The problem is when someone has 1,000 products and users from 20 different countries visiting their store. You can easily grow the transients table to 20,000 records slowing all queries.
  11. None
  12. .HTAccess • We add an .htaccess file to /wp-content/uploads/woocommerce_uploads/ •

    Used to protect downloadable files
  13. SSLs If a user buys SSL for their WordPress site

    you can configure WooCommerce to use SSL automatically.
  14. Maximum Orders / Products • One of the most frequently

    asked question • 60,000+ of products • 100,000+ of orders • We list four examples: https://docs.woothemes.com/document/how-many- products-can-woocommerce-handle/
  15. Performance Heavy Products • Dynamic pricing ◦ Fine for bulk

    pricing discounts, discounts for users, discounts for X products in the cart ◦ Not great for combining all of the above ^ • Bookings ◦ Great for booking an hour long massage ◦ Not great for for booking Santa photos (an available slot every 5 minutes)
  16. WooCommerce 2.4 • released 10/08/2015 • Load the variations (after

    20) via Ajax
  17. WooCommerce 2.5 • Estimated release Q1 2016 • New sessions

    handler. ◦ https://woocommerce.wordpress.com/2015/10/07/new-session-handler-in-2-5/ ◦ Won't store each user’s cart in the options table. ◦ Will be stored in its own indexed table for speed enhancements • REST API ◦ Taxes endpoint ◦ Product taxonomy (tags, categories, shipping classes) • WP-CLI commands ◦ https://woocommerce.wordpress.com/2015/10/01/sneak-peek-wp-cli-support-in-woocommerce/
  18. WooCommerce Database Updates • 2.5 will need to have a

    database update routine • Database updates are immediately after plugin is updated • Would be good to back up the site just in case
  19. WooCommerce Dev Blog • https://woocommerce.wordpress.com/

  20. WooCommerce Debugging

  21. Start with the easy stuff • Double check within the

    WooCommerce System Status Report that they are using the latest version of plugins/themes/WordPress • Check the affected pages with something like Firebug or Chrome Dev Tools for errors that can help you pinpoint the issues. • Check with another browser if possible.
  22. System Status Report

  23. None
  24. None
  25. None
  26. None
  27. WooCommerce Logging • A lot of WooCommerce extensions, including the

    payment gateways included in core, which can log things for you (what is sent out, and received in) • Use WP_DEBUG for bigger issues. WooCommerce acts like any other WordPress plugin. • If there’s a fatal error, then it would typically display the path to the file causing the issue.
  28. Actual Issues • The majority of issues that you will

    see that are from “WooCommerce” are not actually issues with WooCommerce. • Typically they are caused by either hosting issues/variations, or from other code. • It’s not necessarily bad code, it’s just not compatible.
  29. Known Conflicts / Issues https://docs.woothemes.com/document/known-conflicts/

  30. Finding the issues • The best and easiest way to

    debug the issues is to narrow it down. • You should be working on a test/development site that is an exact copy of the customer’s sites. • Then you go back to the beginning. Go back to default, where we know it works.
  31. Don’t break stuff trying to fix it • MAKE SURE

    YOU HAVE BACKUPS IN PLACE BEFORE MESSING WITH THE SITE • You should not be working on the live site. • A staging area is the best way to do this.
  32. If you find an apparent issue: • Replicate it elsewhere

    to make sure that it’s not an issue with the customer site itself. • I like to have a vanilla WordPress site (local or online) that I can use. • You can ping us or log an issue on GH
  33. Customizations • We don’t do them. They need a developer.

    We have a list: http://www.woothemes.com/experts/ • Sometimes customizations break stuff, especially if done wrong. • Templates are an easy way to get a specific look, but tend to be a bit more risky as far as breaking stuff.
  34. Google Fu • We don’t know everything; I don’t even

    know most things. • We have a ton of resources that are available to you, including docs. http://docs. woothemes.com • You can get better with WooCommerce, but you won’t know everything.