WooCommerce RRP allows users to add text before the regular price and sale price of a product from within WooCommerce General settings.
WooCommerce RRP allows a users to add text before the regular price and sale price of a product from within WooCommerce General settings. You can also select to have this text displayed on archive templates by simply clicking a select box.
If you would like to change the display text for a certain product, you can use the WordPress add filter function, please see the FAQ for an example.
If you have suggestions for new features, please add your idea in the “Support” area for this plugin.
If WooCommerce RRP has made your life a little easier, please leave a positive review in the “Reviews” area for this plugin.
/wp-content/plugins/
directoryEntering text into the "Product Price Text" will display before the regular price for the product.
Here you can see the arrow pointing to the text displayed that you entered in the "Product Price Text" field.
Entering text into the "Sale Price Text" will display before the sale price for the product.
Here you can see the arrow pointing to the text displayed that you entered in the "Sale Price Text" field.
Selecting the "Show Text On Archives" will display the text entered in the "Product Price Text" and "Sale Price Text" fields on archive templates.
Here you can see the arrows pointing to the text entered in "Product Price Text" and "Sale Price Text" on an archive.
This can be done using the built in WordPress add filter function. For example, if we had a product with an id of 96 and we wanted to change the text of the “Product Price Text” field to “Your new Product Price Text, the function would like this:
function change_before_regular_price( $woo_rrp_before_price ) { global $post; if ( '96' == $post->ID ) : return 'Your new Product Price Text'; else : return $woo_rrp_before_price; endif; } add_filter( 'woo_rrp_before_price', 'change_before_regular_price' );
This can be done using the built in WordPress add filter function. For example, if we had a product with an id of 96 and we wanted to change the text of the “Sale Price Text” field to “Your new Sale Price Text, the function would like this:
function change_before_sale_price( $woo_rrp_before_sale_price ) { global $post; if ( '96' == $post->ID ) : return 'Your new Sale Price Text'; else : return $woo_rrp_before_sale_price; endif; } add_filter( 'woo_rrp_before_sale_price', 'change_before_sale_price' );
Sure, there are two filters available for you to use:
You will need to tidy this up using a little CSS styling.