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 has 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 athttps://developer.woocommerce.com/docs/creating-custom-settings-for-woocommerce-extensions/.
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:
Figure 13.4: ShipStation uses the WooCommerce Integration class
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...