29,99 €
WooCommerce is one of the most flexible platforms for building online stores. With its flexibility, you can offer virtually any feature to a client using the WordPress system. WooCommerce is also self-hosted, so the ownership of data lies with you and your client.
This book starts with the essentials of building a WooCommerce store. You’ll learn how to set up WooCommerce and implement payment, shipping, and tax options, as well as configure your product. The book also demonstrates ways to customize and manage your products by using SEO for enhanced visibility. As you advance, you’ll understand how to manage sales by using POS systems, outsource fulfillment, and external reporting services. Once you’ve set up and organized your online store, you’ll focus on improving the user experience of your e-commerce website. In addition to this, the book takes you through caching techniques to not only improve the speed and performance of your website but also its look and UI by adding themes. Finally, you’ll build the landing page for your website to promote your product, and design WooCommerce plugins to customize the functionalities of your e-commerce website.
By the end of this WooCommerce book, you’ll have learned how to run a complete WooCommerce store, and be able to customize each section of the store on the frontend as well as backend.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 220
Veröffentlichungsjahr: 2020
Copyright © 2020 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Pavan RamchandaniAcquisition Editor:Karan GuptaContent Development Editor:Aamir AhmedSenior Editor: Mohammed Yusuf ImaratwaleTechnical Editor: Suwarna PatilCopy Editor:Safis EditingProject Coordinator:Manthan PatelProofreader: Safis EditingIndexer:Tejal Daruwale SoniProduction Designer: Jyoti Chauhan
First published: March 2020
Production reference: 1270320
Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK.
ISBN 978-1-83882-283-5
www.packt.com
Packt.com
Subscribe to our online digital library for full access to over 7,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Fully searchable for easy access to vital information
Copy and paste, print, and bookmark content
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.packt.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Patrick Rauland is obsessed with WooCommerce. He has used it as a customer, worked for WooCommerce support, developed core functionality in WooCommerce itself, led three releases, and helped plan their yearly conference (WooConf). He now helps people by writing his blog, creating courses for LinkedIn Learning/Lynda.com, and writing books. Patrick is also the co-founder of WooSesh, an online conference for WooCommerce developers and store owners. Patrick lives in Denver, Colorado, where you can probably find him at a local coffee shop, typing away.
Jeff Daigle is an e-commerce consultant specializing in custom WooCommerce development for subscription- and membership-based sites. He has been building websites for 25 years, and started designing and developing with WordPress in 2006. His varied background in design, development, marketing, and project management helps him to understand complex business requirements and build elegant solutions for his clients. Jeff has been a featured speaker at WooConf, WooSesh, Lift Off Summit, and Makers Biz. He lives in Denver, Colorado, and he works with clients worldwide.
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Title Page
Copyright and Credits
Mastering WooCommerce 4
Dedication
About Packt
Why subscribe?
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
Installing WordPress and WooCommerce
Importance of test sites
Migrating the files but not the database
Testing with a publicly accessible URL
Creating an ad-free experience
Jetpack Without Promotions
Surbma | WooCommerce Without Marketplace Suggestions
Making your own custom plugin
Installing WooCommerce
General store settings
Payment settings
How many payment gateways
Installing plugins through the wizard
Shipping settings
Shipping zones
Printing shipping labels
Dimensions
Recommendations
Activate
Ready!
Disabling nags
Summary
Configuring Products
Exploring the WordPress editor
Simple products
Product data fields
Optional fields
Inventory and stock
Shipping
Understanding taxonomies
Images
SEO tip for image filenames
Long and short descriptions
A fully configured simple product
Variable products
Attributes
Variations
Editing individual variations
Images for variations
Multi-attribute variations
Troubleshooting variations
Digital products
Digital products
Downloadable but not virtual
Configuring virtual and downloadable products
Are downloadable files safe?
Large downloadable files
Accessing downloads
PayPal and downloads
Exploring Product Bundles
Grouped products
Product Bundles
Configurable bundles
Product kits
Subscriptions
Creating a subscription product
Adding a recurring payment option to a product
Subscription settings
Manual versus automatic renewals
Subscription switching
Synchronization
Retrying failed payments
Summary
Organizing Products
Categorizing and tagging
Mutually exclusive and collectively exhaustive
Tagging products
Optimizing product archive pages
Write descriptions for product categories
Context matters
Meta description for categories
A pretty category description
URLs
Redirects in WordPress
Adding product filters to your Shop page
Hidden widgets
Active product filters
Understanding Product blocks
Single product pages
Customizing product blocks
Featuring a product
The value of blocks
Summary
Optimizing SEO and Attracting Traffic
Optimizing your search engine presence (SEO)
Transactional marketing strategies
Acquiring free traffic
Researching keywords for e-commerce
Creating a list of keywords
Comparing search volume
Optimizing for keywords
Creating a sitemap
Configuring breadcrumbs
Adding custom PHP code
Using a plugin
Adding XML sitemaps
Adding an XML sitemap with Yoast SEO
Possible movement of XML sitemaps to WordPress Core
Submitting an XML sitemap to Google
Summary
Managing Sales Through WP Admin
Fulfilling orders
Exploring new order notifications
New orders badge in the site admin
Browsing orders
Viewing shipping information
Packing the boxes
Printing shipping labels
Dropping off packages
Marking orders as completed
Refunding orders and payments
Refund requests
Building a refund request process
Viewing sales data
Admin banner
WooCommerce Analytics
What sells
Gross profit
Taxes
Using third-party reporting platforms
Exploring Metorik
Pick one
Summary
Syncing Product Data
Exporting out of WooCommerce
Importing products via CSV
Exploring a CSV file
Including content in the CSV file
Importing a CSV
Understanding ERP
Finding an ERP
Understanding Dear Systems
Using an ERP
Summary
Configuring In-Store POS Solutions
Setting up WooCommerce POS
Accepting credit cards
Setting up Payment for Stripe
Selecting WooCommerce POS
Setting up Square
Connecting with Square
Setting up Square for WooCommerce
Syncing data
Marking products to sync
Manual syncing data
Flat versus hierarchical categories
Syncing data in-store and online
One database
Mastering synced databases via API
Manually syncing data
Summary
Using Fulfillment Software
Sending and updating shipping information
Sending shipping data
Sending emails
Configuring webhooks
Building a custom integration
Updating data
Processing a daily email
Retrieving order data through a custom integration
Configuring Shippo
Signing up for Shippo
Configuring Shippo setup information
Fulfilling orders with Shippo
Configuring ShipStation
Integrating with ShipStation
Fulfilling packages with ShipStation
Printing pick lists
Using the ShipStation app
Summary
Speeding Up Your Store
Monitoring speed and performance
Finding a starting point with GTMetrix
Testing changes
Digging into Waterfall data
Setting up periodic testing
Minifying CSS and JavaScript resources
Adding new functionality
Optimizing images
Optimizing images with Jetpack
Optimizing images with Imagify
Using the bulk updater
Caching and e-commerce
Configuring caching plugins
Configuring caching via HTACCESS
Page caching
Optimizing content above the fold
Lazy loading images with Jetpack
Summary
Setting Up Your Theme
Choosing a theme for WooCommerce
Exploring the Twenty Twenty theme
Storefront
Sticky add-to-cart button
Product pagination
Exploring Astra
Viewing hooks on the Frontend
Installing hook visualizers
Stop showing hooks
Browsing through code for actions
Adding a product data tab
Installing a custom tab plugin
Adding a custom tab
Summary
Customizing the Product Page
Adding social proof (FOMO)
Setting up FOMO
Customizing notifications
Removing events
Hiding notifications on mobile
Customizing notification frequency
Adding a video tab
Installing a video tab
Configuring a video with WooCommerce
Configuring defaults
Hiding the credit
Displaying 360-degree images
Installing WooCommerce 360º Image
Adding 360 images to products
Summary
Building a Landing Page
Building a long-form landing page
Creating a new page
Understanding structure of a landing page
Adding content to a landing page
Adding e-commerce to a landing page
Adding a featured product
Adding an add-to-cart button
Finding the product ID
Adding the button
A/B test everything
Install the Simple Page Tester plugin
Set up an experiment
Measuring results
Summary
Creating Plugins for WooCommerce
Technical requirements
Building a basic WooCommerce plugin
Creating a plugin
Checking if WooCommerce is active
Customizing order statuses
Using the WooCommerce Example plugin
Registering a post status and adding it to WooCommerce
Building a settings page with WooCommerce
Creating the main integration file
Creating the Integration child class
Creating a constructor
Adding field settings
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
WooCommerce is one of the most popular e-commerce platforms in the world. There are over 1,000,000 stores running WooCommerce for a huge variety of reasons. Some store owners like the thousands of themes they have access to, some like that they can build on top of their existing WordPress sites, and others really like the open source customizable angle and knowing that they can always read and customize the code any way they want. If you decide to build a store on WooCommerce, be prepared for an almost overwhelming amount of choice. Because it's so popular, you'll always have a lot of options in front of you.
Mastering WooCommerce 4 takes you from having absolutely nothing to having a fully functioning store. As the title of the book implies, we will go deep into WooCommerce and show you the basic options as well as some of the more advanced customizations. We'll do so in an orderly way, starting from the very beginning by setting up a test WordPress site and covering fundamental topics that we'll revisit throughout the rest of the book. Each chapter that follows will expand on the basics, allowing for a gentle progression curve that will allow almost any user to follow along. Each chapter will cover a new section of WooCommerce and thus can be seen as an independent unit, letting you tackle it separately from the others if you are already proficient in the other topics.
We'll first introduce you to the basics of WooCommerce and WordPress, which will help you develop and debug any issue. You will then learn how to create a simple product and optimize it for SEO. We will then look at shipping, taxes, and payment. After that, we will look into integrating with third-party services for fulfillment and reporting. Furthermore, we will also dive into Point of Sale (POS) systems that let you sell in person. We will then end the book by creating a very basic custom plugin that you can use for any customizations you wish to make.
Mastering WooCommerce 4 is aimed at anyone who builds WooCommerce sites. You could be a developer who builds sites for clients or you could be a store owner who wants to take a DIY approach with your own store.
You should be familiar with the basics of WordPress. That means understanding what plugins do, what a theme does, how to install plugins and themes, how to keep your site up to date, and how to create posts and pages.
Chapter 1, Installing WordPress and WooCommerce, brings everyone up to speed. If you've never installed WooCommerce, we're going to go through it together step by step, looking at setting up our store settings, how we're going to accept payments, and how we're going to keep the admin interface clean.
Chapter 2, Configuring Products, digs into all of the settings for products. We'll cover when you should use certain product types, how to give your visitors as much information as possible, some of the premium product types such as WooCommerce Subscriptions, and when they are worth the money.
Chapter 3, Organizing Products, explains how to add categories and tags to your store and when you would want to do so. If you do it without thought, you're leaving money on the table. Organize your products in the correct way and customers will be able to find your products and check out in a flash.
Chapter 4, Optimizing SEO and Attracting Traffic, is all about getting traffic. We're going to look into some of the common ways to bring people to your site, focusing especially on Search Engine Optimization (SEO) and content marketing, which is very popular with WordPress.
Chapter5, Managing Sales through WP Admin, helps store owners manage and fulfill sales. Once you get that traffic, you'll have orders and will need to ship your products. There are some hidden gems in the WooCommerce admin realm that make this process surprisingly easy.
Chapter 6, Syncing Product Data, illustrates how tricky it is to keep all of your product data in sync. We'll cover a manual process that you can use to update your products and investigate services that do this for you automatically.
Chapter 7, Configuring In-Store POS Solutions, will highlight the different ways you can sell products in person. We lay out several POS solutions, along with their benefits and drawbacks, to help you choose the right one for your store or your client's store.
Chapter 8, Using Fulfillment Software, draws together another suite of tools, this time focusing on fulfillment (getting a package to a customer's door). There are built-in options that are great for small orders but at a certain point, you'll want to switch to a separate solution to save you money and time.
Chapter 9, Speeding Up Your Store, highlights several ways in which you can speed up your store and talks about the importance of doing so. If your store is slow, no one will want to check out, so look into these techniques to speed up your store.
Chapter 10, Setting Up Your Theme, will show you my two favorite themes for WooCommerce and how you can set them up to display your products.
Chapter 11, Customizing the Product Page, is all about building that perfect product page. We'll look into 360-degree images, videos, and adding social proof.
Chapter 12, Building a Landing Page, will show you some key principles of good landing page design, how you can add e-commerce functionality to the landing page, and then how to A/B test and optimize that page.
Chapter 13, Creating Plugins for WooCommerce, is here for the developers. If you want to take advantage of WooCommerce's open source code, now is the time to write code to help you modify WooCommerce itself, customize an order status, build plugins, and integrate them.
You will need to have a functioning WordPress site. Ideally, you should know how to create a test or development site, since many of our examples will change the frontend of your site and you don't want your visitors seeing a work-in-progress store.
I highly recommend that you always keep WordPress and WooCommerce in their latest versions, as well as all plugins and themes for that matter. The further you are behind the latest live version, the more things won't work. It's also helpful, but not necessary, to have familiarity with HTML, CSS, JavaScript, and PHP.
Software/hardware covered in the book
OS requirements
WordPress 5
Windows, macOS X, and Linux (any)
WooCommerce 4
Windows, macOS X, and Linux (any)
If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying/pasting of code.
You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
Log in or register at
www.packt.com
.
Select the
Support
tab.
Click on
Code Downloads
.
Enter the name of the book in the
Search
box and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
WinRAR/7-Zip for Windows
Zipeg/iZip/UnRarX for Mac
7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub athttps://github.com/PacktPublishing/Mastering-WooCommerce-4. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available athttps://github.com/PacktPublishing/. Check them out!
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "You can pass in a$argsarray."
A block of code is set as follows:
// Check to make sure WooCommerce is active if ( in_array( 'woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { ((our existing code)) }
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "And then click the Features tab."
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packt.com.
WooCommerce was designed as a WordPress plugin from its conception. Everything that WooCommerce has done is done on top of the WordPress platform. So, while this is a book about mastering WooCommerce, we can't start talking about WooCommerce until we make sure a few basic things are taken care of in your WordPress installation.
We're going to make sure your WordPress site is set up correctly and then install WooCommerce. To do that, we're going to look into the following:
Why and how you should use test sites
Creating an ad-free admin experience
How to install WooCommerce
Configuring settings through the WooCommerce welcome wizard
Once you've done all of the preceding, you'll have WooCommerce installed on a test site and you can start building your online store.
Let's first look at why and how we should use test sites with any WordPress installation.
If you've been a WordPress developer for a while, you're probably familiar with test sites. And while they're important in regular WordPress development, they're critical in WooCommerce development. The following screenshot shows what a website development process looks like:
With a typical WordPress development project, you'll build custom functionality on your local machine. Then, you'll upload it to a test site where the client usually approves it. Then, you move the test site to the live site, replacing data and files.
And this works great for most WordPress projects. But when it comes to e-commerce, there are two problems:
You can never replace the live database
: Since an e-commerce site is always on and always accepting new orders, payments, and marking items as shipped, you can't replace the live database with the test database.
E-commerce functionality often needs a publicly accessible URL to work properly
: A lot of e-commerce functionality (shipping, payment, and taxes) interacts with third parties, some of which need a publicly accessible URL to return data. So, it's much harder to test your site on a local machine.
Since the e-commerce site has more demands, we're going to cover some of the things you need to do with a test site:
Migrate files but not the database
Test with a publicly accessible URL
With these two extra criteria met, both of which can be done by a good website host, you can easily test and launch your own WooCommerce site. Let's look into migrating files first.
