SimpleStripe WooCommerce Gateway is a lightweight plugin that adds a Stripe Checkout–based payment method to WooCommerce. It is designed to be clean, self-contained, and easy to customize for personal or commercial projects.
- Redirects customers to Stripe Checkout using the Stripe PHP SDK.
- Supports both classic and WooCommerce Blocks checkout flows.
- Provides test and live secret keys and a webhook signing secret field.
- Updates WooCommerce order status after successful payment.
- Includes webhook endpoint validation for Stripe events.
- Does not send duplicate emails or reprocess payments on refresh.
- WordPress 5.0+
- WooCommerce 5.0+
- PHP 7.4 or later
- Stripe account (for API keys and webhooks)
simplestripe-woocommerce-gateway/
├── simplestripe-woocommerce-gateway.php
└── assets/
└── js/
└── blocks.js
- Download or clone this repository.
- Copy the
simplestripe-woocommerce-gatewayfolder intowp-content/plugins/. - Activate the plugin from WordPress → Plugins.
The plugin relies on the official Stripe PHP SDK. This is not bundled to keep the plugin light. You must install or download the SDK manually before using the plugin.
You have three options:
-
Use Composer (recommended):
Run this in your site’s root or any writable directory:composer require stripe/stripe-php
Then set the plugin’s Path to autoload.php to the full path of the generatedvendor/autoload.phpfile. -
Download manually:
Visit Stripe PHP on GitHub, download the release ZIP, and extract it somewhere accessible. -
Use a hosted vendor folder:
You can copy an existingvendordirectory from another plugin or project that already includesstripe/stripe-php.
Example full path you might enter in settings:
/home/youruser/public_html/vendor/autoload.php
- Go to WooCommerce → Settings → Payments.
- Enable Pay by card (Stripe).
- Click the method name to edit settings.
-
Fill in:
- Test secret key (sk_test_...)
- Live secret key (sk_live_...)
- Webhook signing secret (whsec_...)
- Path to autoload.php
Once configured, add this webhook to your Stripe Dashboard:
https://your-site.tld/wp-json/simplestripe/v1/webhook
Supported events:
- checkout.session.completed
- payment_intent.succeeded
- charge.succeeded
The plugin safely checks if the target status exists before applying it. You can customize this behavior in your theme or an additional plugin.
add_action( 'woocommerce_payment_complete', function( $order_id ) {
$order = wc_get_order( $order_id );
if ( ! $order ) {
return;
}
// Only for SimpleStripe
if ( $order->get_payment_method() !== 'simplestripe' ) {
return;
}
// Safely set to on-hold if available
if ( array_key_exists( 'wc-on-hold', wc_get_order_statuses() ) ) {
$order->update_status( 'on-hold', 'Stripe payment confirmed.' );
}
});
The plugin automatically registers its payment method with WooCommerce
Blocks. The file assets/js/blocks.js is loaded only on the
checkout page.
- Does not include the Stripe PHP SDK - install it manually or with Composer.
- Webhook verification requires a valid signing secret from Stripe.
- If you fork this repository, update the REST route and text domain.
Open source under MIT