Book Image

Mastering WooCommerce 4

By : Patrick Rauland
Book Image

Mastering WooCommerce 4

By: Patrick Rauland

Overview of this book

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.
Table of Contents (15 chapters)

Building a settings page with WooCommerce

When you're building your own plugin, you'll very likely have to build a settings page. There's a lot to building a settings page from scratch. But if you are just building an integration, WooCommerce created some technology that makes it easier for you to add your own settings screen.

We're going to cover some of the coding decisions in the WooCommerce Integration class. If you want, you can see the finished code at https://github.com/woogists/woocommerce-integration-demo.

We can see that one of the plugins we looked at earlier in this book takes advantage of the Integration class, which we can see in the following screenshot:

We're not going to explain every single line. But we are going to cover the essential lines and why you need them.

Let's build our own settings page using the Integration class. We...