13

How to Change WooCommerce Widget Titles

Powered by WPCodeBox

Learn how to easily change WooCommerce widget titles with this helpful snippet. Perfect for customizing your online store.


<?php

add_filter( 'widget_title', function( $title, $instance, $id_base ) {
	
	if( 'onsale' == $id_base) {
		return "My new cool title for the On Sale widget.";
	}
}, 10, 3);

Other Snippets

WPCodeBox is a WordPress Code Snippets Manager that allows you to share your WordPress Code Snippets across your sites.