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/sagnikagoswami/woo-custom-product-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.
WooCommerce Custom Product Badge
A custom WordPress plugin developed using PHP and WooCommerce to assign and display promotional badges on individual product pages.
Features
- Adds a custom badge selection field to the WooCommerce product editor.
- Supports predefined badges:
- Best Seller
- Hot Deal
- New Arrival
- None
- Stores the selected badge using WordPress product metadata.
- Displays the assigned badge above the product title on single-product pages.
Technologies Used
- PHP
- WordPress
- WooCommerce
- WordPress Hooks and Metadata API
Installation
- Download or clone this repository.
- Place the plugin folder inside
wp-content/plugins/in your WordPress installation. - Ensure WooCommerce is installed and activated.
- Navigate to WordPress Dashboard → Plugins and activate the custom product badge plugin.
Usage
- Navigate to Products → All Products in the WordPress dashboard.
- Open a product for editing.
- Select a badge from the custom badge dropdown.
- Update the product to save your selection.
- Visit the product's individual page to view the assigned badge.
Project Status
This project is a custom WooCommerce plugin developed to explore WordPress plugin development, product metadata, and WooCommerce customization.
The implementation is undergoing improvements to its badge rendering, input validation, and compatibility.
Disclaimer
This is an independent educational project and is not affiliated with or endorsed by WooCommerce or Automattic.