i'm customizing a popular CSV exporting tool for Woocommerce. I've got an issue on extracting names for products. Look at this line of code:
$product->name = get_the_title($product->ID);
This returns a string like
Variation #4923 of ProductName
I would like to remove "Variation #Number of " from every export that i make. I do not want to use a regexp. I thought about modyfing the first line of code in :
$temp = new WC_Product($product->ID); $product->name = $temp->get_title();
so that i could use get_title() which is a native call of Woocommerce. How can i customize the get_title() function, then? Thanks.