get woocommerce product in cf7 code example
Example: display product page title in field cf7
wpcf7_add_shortcode( 'cf7_extra_fields', 'cf7_extra_fields_func', true );
function cf7_extra_fields_func( $atts ) {
$html = '';
$html .= '<input type="hidden" name="page-title" value="'.get_the_title().'" />';
$html .= '<input type="hidden" name="page-url" value="'.get_the_permalink().'" />';
return $html;
}