You can embed a configured product anywhere on your site using a shortcode. This will allow you to sell the product from anywhere on your site (post, page, sidebar widget etc).
Step 1) Copy your product shortcode from the ‘Products’ menu under the ‘Stripe Payments’ admin dashboard.
Step 2) Paste the shortcode in a post, page or text widget.
Embedding Products Using the Basic WP Editor
If you are still using the basic WordPress editor this section will be useful for you. If you are using the new Gutenberg editor, please see the next section.
You can also embed a product shortcode into any post or page using the shortcode inserter. Click on to the Stripe Payments icon in the post editor.
Click on the Product Shortcode button. Select the product you wish to insert. Then click on ‘Insert Shortcode’. This will insert the shortcode of your product directly into the post/page.
When you use this shortcode to add a Stripe product to a WordPress post or page, it should look like the following example:
Embedding Products Using the Gutenberg Editor (Latest WP Version)
Video Tutorial: Embedding a Stripe Payments Product with the Gutenberg Editor
The Gutenberg editor which is automatically installed with any recent WordPress version allows blocks of content to be added to a post or page. If you have the Stripe Payments Plugin installed and activated on your website, the Product Shortcode Inserter can be found under the common blocks section within a page or a post. Using the Product Shortcode Inserter is an efficient, hassle free and quick approach to insert any of your previously created products to any WordPress page.
If you wish to add one of your products/services to a page or a post:
- Add a new page/post or edit an existing page/post.
- Click on the ‘+‘ symbol to add a new block.
- Scroll down to the ‘Common Blocks‘ section.
- Click on the ‘Stripe Payments Product‘ icon to use the shortcode inserter.
- Now on the right-hand side of the page, select the product you wish to insert from the drop-down menu.
- Your product will now be inserted. If you’d only like to show the payment button for the product use the ‘Show Button Only‘ option in the block editor.
Specifying a Checkout Popup Language
By default, Stripe tries to autodetect and set user’s preferred language. However, in some situations, you may want to force Stripe to use a specific language for your shortcode.
In addition to English (en) language, Stripe supports the following checkout popup languages:
- Simplified Chinese (zh)
- Danish (da)
- Dutch (nl)
- English (en)
- Finnish (fi)
- French (fr)
- German (de)
- Italian (it)
- Japanese (ja)
- Norwegian (no)
- Spanish (es)
- Swedish (sv)
You can use the “checkout_lang” shortcode parameter to set specific language. For example, to set Spanish language, use it’s code (es):
[asp_product id="123" checkout_lang="es"]