Last week I wrote about using Laravel’s Cashier package to create a subscription-based site. It was based on my experience creating a small SaaS site that serves Caldera Forms users. If you read that article, you might have wondered why I didn’t use Easy Digital Downloads or WooCommerce, or even my own plugin Caldera Forms. All of those have plenty of tools for creating and managing recurring subscriptions.
One answer is that I wanted to learn something new, but I actually found it easier for what I wanted to do. My last article was very technical. In this post, without talking too much about code I want to compare the experience to working with WordPress eCommerce.
What I Did and Didn’t Get With Cashier
If you read the article on Cashier, you will notice that the package only provided an API on top of the Braintree SDK. It also doesn’t provide a trait that adds subscription details to the main User model. I did not get an actual sign up form, the HTTP routes I needed to display that form or process it, or the controller logic for managing it.
What I got is way beyond just installing the Braintree SDK. In fact, that’s what I started with when building my own WordPress plugin to work with Braintree. On top of that SDK I built up a bunch of logic specific to my use case. Nothing that is particularly reusable outside of Caldera Forms.
In the WordPress world, this would make for a terrible plugin. Who would want a WordPress eCommerce plugin that didn’t provide a way to make purchases out of the box?
Yes WordPress eCommerce Is Awesome
WordPress developers are used to getting a complete package. When we install a WordPress eCommerce plugin, we have all the forms we need and they just work. For most WordPress users that is excellent and there is nothing wrong with that.
That’s one of the reasons WordPress is so successful. But, for developers, it’s not always the best option. I have a lot of experience building on top of WooCommerce and Easy Digital Downloads. Working with those plugins, especially Easy Digital Downloads is great, but I often feel like I’m working against the main purpose — a simple plug and play WordPress eCommerce system.
But these platforms have limitations that can lead to real scaling issues. For example, I’ve had to add ElasticSearch to WooCommerce to help it scale. For subscription sites, serving the front-end and processing renewals can be an issue if both happen to spike at the same time.
It’s About Infrastructure
In a more developer-focused platform like Laravel, it makes sense to just provide infrastructure, not a complete system like a WordPress plugin provides. This distinction makes sense if you consider that WordPress is for site builders and Laravel is for developers. But that definition of who WordPress is for doesn’t really hold up.
WordPress is for some many different types of users and developers that it’s dangerous to pigeonhole different platforms for different people. There are tons of developers out there who are making site-specific eCommerce solutions that would be better served by an eCommerce infrastructure than a WordPress eCommerce plugin.
Of course, that same infrastructure could be used to make one or more WordPress plugins. That’s a pretty neat idea. I’d be tempted to build something like that, but unless I had a business that could support it I wouldn’t. Or I’d start it with good intentions, but probably not finish it because open source software doesn’t grow on trees.
I am excited to see how the Run Command project that Daniel Bachhuber has started. Daniel is the primary maintainer of WPCLI and a major contributor to the WordPress REST API. Both are important WordPress infrastructure. Through Run Command he is providing tangible benefits in terms of support and custom development to WordPress agencies and hosts that need these tools.
It’s an interesting approach and I would love to see more ways for our ecosystem to fund the development and maintenance of important infrastructure.
One of the ways Laravel is funded is through selling their deployment service Forge, which uses both Laravel and Cashier, and the application start point Spark. It’s a cyclical relationship. Those paying for these products for Laravel help make Laravel better. This is similar to how WordPress started out.
No Comments