Displays a 'new' badge on WooCommerce products published in the last x days.
A very simple plugin that displays a ‘new’ badge on products that were published in the last x days. X is defined on the catalog tab of the WooCommerce settings screen.
Please feel free to contribute on github.
woocommerce-new-product-badge
to the /wp-content/plugins/
directorywoocommerce-new-product-badge
to the /wp-content/plugins/
directoryThere are only a couple of styles applied to the badge. Although not best practise it’s probably safe to just overwrite these with your own css. However, if you want to do it properly you can either dequeue the css:
add_action( 'wp_enqueue_scripts', 'remove_new_badge_styles', 30 ); function remove_new_badge_styles() { wp_dequeue_style( 'nb-styles' ); }
Or use the filter:
add_filter( 'woocommerce_new_badge_enqueue_styles', 'remove_new_badge_styles' ); function remove_new_badge_styles() { return false; }
Initial release.