top of page
  • Foto del escritorslavag8

A New WooCommerce Extension – Sponsorship

I love WooThemes and their commerce plugin – WooCommerce. For as much as people may rant about the history of the plugin, or the fact that extensions cost money – it’s important to remember that the plugin is free and that WooThemes offers free themes that work with it (incredibly well). All that said, the thing I like most about WooCommerce is that it supports extensions. It demonstrates a lot of great things but my favorite is that it highlights that the Woo guys know they won’t think of everything.

There are other solutions out there

I know there are other crowdfunding solutions out there, even some that work with WordPress, like Fundraising. But the challenge that I find with many of them is that they require that I use Paypal – and I hate Paypal. So it was time to see if it were possible to create a solution that would use Stripe instead. But because WooCommerce does so much already, it felt like it would be a smarter move to build on top of it – using both WordPress and WooCommerce as an underlying platform, than to start from scratch.

Step 1: Create a different Product Type – a Sponsorship Project

The first step was to make sure we could create a product that was unique – where we could capture the total project goal, the target date and the contribution levels.

Step 2: Calculate Status & Display Contribution Levels

After the product was defined, the gui needed to support the display of both the status and the various contribution levels that are available. While additional widgets will be created, we needed a baseline display that we could use to consistently test the work so far.

Step 3: Collect Payment – Stripe, not Paypal

You know what’s next – the collection of funds. Here’s the thing though. First, it needed to support Stripe and even though WooCommerce supports Stripe (via a different extension), that extension didn’t support parts of the API that would let us create a pledge without charging anyone. After all, the process is that you collect pledges, not payments and only charge if the final target is met. Most other solutions for WordPress just charge your account. Then they have to do the work of refunding money. I didn’t want to do that. I wanted actual pending pledges without any charging up front. So we had to create our own interface to Stripe.

Step 4: Keep Orders on Hold

As you can see, our extension heads over to Stripe, creates the user and the potential charge, but leaves the order on hold until the total is met. If not, it won’t charge anyone anything. The best part – each instance of the plugin collects it’s own stripe credentials – leaving us out of the money game. So the plugin just does what it needs to without becoming a central processor of charges.

It’s not Done

As you might have guessed, it’s not done yet. And we haven’t talked to WooThemes yet to put it in their list of extensions. But we’re pretty excited about how it’s coming along.

#woocommerce #woothemes

0 visualizaciones0 comentarios

Entradas Recientes

Ver todo

Can you scale WooCommerce? One of the most common questions I hear a lot about WordPress and eCommerce revolves around the notion of WooCommerce and it’s ability to scale. “Can you scale WooCommerce?”

bottom of page