Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/azmayen-farhan/buy-now-and-discount-badge/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
A lightweight plugin that adds two things to WooCommerce products:
- Buy Now button: sends the customer straight to checkout with the product in the cart. Works with simple and variable products (the selected variation is picked up automatically).
- Discount badge: shows how much the customer saves on sale products, either as an amount ("Save $20") or a percentage ("Save 25%").
Each one is available as an Elementor widget (with Content and Style controls) and as a shortcode.
Requirements
- WordPress 5.8+
- PHP 7.4+
- WooCommerce
- Elementor 3.5+ (only for the widgets, shortcodes work without it)
Shortcodes
[buy_now_button text="Buy Now"][loop_save_price format="amount|percent" prefix="Save"]
Installation
- Download the plugin zip from the Releases page.
- In WordPress, go to Plugins > Add New > Upload Plugin and upload it.
- Activate it. The widgets appear under "Buy Now + Discount Badge" in Elementor.
Author
Azmayen Farhan - https://azmayenfarhan.com