Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

WooCommerce Basics

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Custom Post Types ● Products ● Variable products ● Shop orders

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

WooCommerce Architecture

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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.

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

.HTAccess ● We add an .htaccess file to /wp-content/uploads/woocommerce_uploads/ ● Used to protect downloadable files

Slide 13

Slide 13 text

SSLs If a user buys SSL for their WordPress site you can configure WooCommerce to use SSL automatically.

Slide 14

Slide 14 text

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/

Slide 15

Slide 15 text

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)

Slide 16

Slide 16 text

WooCommerce 2.4 ● released 10/08/2015 ● Load the variations (after 20) via Ajax

Slide 17

Slide 17 text

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/

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

WooCommerce Dev Blog ● https://woocommerce.wordpress.com/

Slide 20

Slide 20 text

WooCommerce Debugging

Slide 21

Slide 21 text

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.

Slide 22

Slide 22 text

System Status Report

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

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.

Slide 28

Slide 28 text

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.

Slide 29

Slide 29 text

Known Conflicts / Issues https://docs.woothemes.com/document/known-conflicts/

Slide 30

Slide 30 text

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.

Slide 31

Slide 31 text

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.

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

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.

Slide 34

Slide 34 text

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.