Woocommerce has a built in class (WC_Structured_Data
) to genrate strucured data into product pages. This class or function is tied to woocommerce_single_product_summary
action but it is missing from my temaplte file for some reason.
I am trying to call this function from my functions.php file without any luck.
How could I call generate_product_data()
function from my functions.php? Here is the class: https://github.com/woocommerce/woocommerce/blob/02cf0dfaed5923513de0c88add597d1560c2cfd2/includes/class-wc-structured-data.php