Created
July 23, 2022 15:08
-
-
Save Yorlinq/df6157be99dbab1b16753a5fa11b1206 to your computer and use it in GitHub Desktop.
Shortcode for 'Current product name' - WooCommerce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shortcode for 'Current product name': [yl_current_product_name] | |
function yl_current_product_name_shortcode() { | |
global $product; | |
$output = get_the_title(); | |
return $output; | |
} | |
add_shortcode( 'yl_current_product_name', 'yl_current_product_name_shortcode' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment