=== Shopper Rewards === Contributors: @maryamnoor00 Author URI: https://mrymnoor567.github.io/themaryam/ Tags: rewards, woocommerce, surprise, cart progress bar, discount, Requires at least: 5.8 Tested up to: 6.9 Requires PHP: 7.4 Stable tag: 1.0.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html A simple and elegant WooCommerce rewards plugin that adds a dynamic progress bar, discount rewards, and badges on the cart and checkout pages. == Description == **Shopper Rewards** is a lightweight and secure plugin that motivates your customers to add more items to their cart by showing them how close they are to unlocking a *surprise reward* — such as a discount, free shipping, or free products. This plugin seamlessly integrates with the cart, checkout, and thank-you pages, offering a dynamic experience that boosts conversions and customer engagement. ### ✨ Features - **Dynamic Progress Bar** – Displays how much more the customer needs to spend to unlock a reward. - **Surprise Discount or Free Shipping** – Automatically apply or show a reward once the spending threshold is reached. - **Custom Messages & Labels** – Fully customizable messages before and after the unlock. - **Thank-You Page Integration** – Show personalized badges or WhatsApp contact buttons after checkout. - **Responsive & Lightweight** – 100% responsive design with no unnecessary bloat. - **Secure & Compatible** – Built following WordPress and WooCommerce coding standards. ### 🎯 Purpose The goal of Shopper Rewards is to **increase average order value (AOV)** by motivating users to reach a target threshold in their shopping cart. Once a customer adds enough items to meet the target, they instantly unlock a *surprise reward*, creating a fun and rewarding shopping experience. --- == Installation == 1. Upload the plugin folder to `/wp-content/plugins/shopper-rewards/` 2. Activate the plugin through the *Plugins* menu in WordPress. 3. Go to **WooCommerce → Shopper Rewards Settings** to configure your threshold, reward type, and display options. 4. Set your custom messages, labels, and progress bar styles. --- == Frequently Asked Questions == = Does this plugin work with any theme? = Yes, Shopper Rewards uses flexible WooCommerce hooks and fallback display methods to ensure compatibility with most WooCommerce-ready themes. = Can I customize the messages? = Absolutely. All messages (before unlock, after unlock, labels, etc.) can be customized from the plugin’s **Messages & Labels** settings tab. = How are rewards applied? = You can set rewards as free shipping, percentage-based discounts, or custom messages shown at checkout. = Does it support translation? = Yes. The plugin is translation-ready and follows WordPress i18n standards. Place your `.po` and `.mo` files in the `/languages/` folder. = Is it secure for production sites? = Yes, the plugin follows all WordPress Plugin Security Guidelines — including proper escaping, sanitization, and nonces for safe data handling. --- == Screenshots == 1. **Settings Page – Messages & Labels Tab** Customize messages shown before and after unlocking rewards. 2. **Cart Page – Progress Bar Display** Shows a visual progress indicator with remaining amount until a surprise reward is unlocked. 3. **Cart Totals – Surprise Discount Applied** Displays a surprise discount line below subtotal and total once threshold is met. --- == Changelog == = 1.0.2 = * Initial release * Added dynamic progress bar on cart page * Added customizable messages and labels * Added thank-you WhatsApp badge integration * Fully compatible with WordPress 6.7 & WooCommerce 9.x * Security hardened following WordPress coding standards --- == Upgrade Notice == = 1.0.1 = First stable release — adds full WooCommerce reward system with progress bar and WhatsApp integration. --- == Security Notes == - All user inputs are sanitized using WordPress functions (`sanitize_text_field`, `esc_html`, `esc_attr`, `wp_kses_post`). - Nonces are used for form submissions to prevent CSRF attacks. - Proper escaping and translation functions (`esc_html__`, `esc_attr__`, etc.) are used throughout. - No external API calls or user data tracking is performed. --- == Credits == Developed by **Maryam Kamal** A learning project focused on practical WooCommerce plugin development and security best practices. ---