WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce Product Archive Customiser
can i change the "New Badge" ??? (5 posts)

  1. Bildfabrik
    Member
    Posted 11 months ago #

    Hello,

    thanks for that nice little plugin. I really find woo commerce much more usable since i installed it!

    I would like to use the new badge function, but due to i administrate german web pages i would like to use the badge in german too. Is there any possibility to do that? Is it perhaps just a little graphic i can change? If so, where can i find it???

    Greetings from Germany,

    Wingis

    http://wordpress.org/extend/plugins/woocommerce-product-archive-customiser/

  2. MadsSafi
    Member
    Posted 8 months ago #

    Im also looking for a way to translate the little "New"-badge. I can se that it is not a graphic, but a small css-button(?) with a text-label. But where can the word "New" be translated inte other language/word? (and is it also possible to change the color of the button?)
    Hope someone have a solution...?
    :-) Mads

  3. jameskoster
    Member
    Plugin Author

    Posted 8 months ago #

    You should be able to translate this string using the CodeStyling Localization plugin.

  4. MadsSafi
    Member
    Posted 8 months ago #

    Hi again,
    Thanks for your reply. But I have already tried with the plugin, and it wont work. :-(

    BUT :-)
    Im a happy man, because your answer made me look into it again, and I have now solved the problem. I found this code in "archive-customiser.php" and close to the end I have changed "New" to the danish "Ny", and it works great now :-)

    function woocommerce_pac_show_product_loop_new_badge() {
    				$postdate 		= get_the_time( 'Y-m-d' );			// Post date
    				$postdatestamp 	= strtotime( $postdate );			// Timestamped post date
    				$newness 		= get_option( 'wc_pac_newness' ); 	// Newness in days as defined by option
    
    				if ( ( time() - ( 60 * 60 * 24 * $newness ) ) < $postdatestamp ) { // If the product was published within the newness time frame display the new badge
    					echo '<p><span class="wc-new-badge">' . __( 'Ny', 'woocommerce-product-archive-customiser' ) . '</span></p>';
    				}

    Maybe this fix could also help 'Bildfabrik'?

    Stay cool,
    :-) Mads

  5. faronbi
    Member
    Posted 8 months ago #

    How do I change the WooCommerce New Product Badge button color?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.