WordPress filter hook

woocommerce_product_title

Defined by WooCommerce and fired by 5 plugins in total, running on 7M+ sites between them.

How to use woocommerce_product_title

It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'woocommerce_product_title', function( $title, $object ) {
	// Change $title here.
	return $title;
}, 10, 2 );

Argument names come from YITH WooCommerce Product Bundles's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

5 plugins that fire woocommerce_product_title

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs apply_filters( 'woocommerce_product_title', $this->get_name(), $this ) includes/abstracts/abstract-wc-product.php:2102
  2. YITH WooCommerce Product Bundles icon YITH WooCommerce Product Bundles3,000+ installs apply_filters( 'woocommerce_product_title', $title, $this ) includes/objects/class.yith-wc-product-bundle.php:177
  3. theMarketer icon theMarketer800+ installs apply_filters( 'woocommerce_product_title', $name, self::$asset ) Tracker/Model/Product.php:249
  4. Salevo Boost Sales for WooCommerce icon Salevo Boost Sales for WooCommerce200+ installs apply_filters( 'woocommerce_product_title', $title, $this ) includes/wbs_product_bundle.php:184
  5. QODE Product Bundles for WooCommerce icon QODE Product Bundles for WooCommerce10+ installs apply_filters( 'woocommerce_product_title', $title, $this ) inc/bundle-product/woocommerce/class-wc-product-qode-bundle-product.php:251

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.