Hi Will,
Thank you for sharing further details and for clearing this up.
I've performed some testing and research and here are my findings:
1. Your expectation of automatic conversion of straight quotes into curly ones is correct for the text coming from the post's content/body, as WordPress applies "wptexturize" filter for some special formatting rules.
You can read more about that filter from these resources:
https://developer.wordpress.org/reference/functions/wptexturize/
hidden link
However, this filter is not applied to the text coming from the custom fields and from shortcodes, and for that text's automatic formatting, you'll need some custom function or shortcode.
2. Your observation is correct about the Toolset WooCommerce Views plugin too.
In my tests, I was able to reproduce this behavior that if Toolset WooCommerce Views plugin is active, this special formatting is not applied to the post's content/body, if it is being shown through a layout.
I've shared this report to concerned team for further review and will keep you updated through this ticket.
3. I managed to make this automatic formatting work for text coming from custom fields and post/body, using a custom shortcode:
add_shortcode('get-texturize-output', 'get_texturize_output_fn');
function get_texturize_output_fn($atts) {
$a = shortcode_atts( array(
'field' => '',
'id' => '',
), $atts );
if ($a['field'] == 'body') {
$content = apply_filters( 'the_content', get_the_content() );
$content = wptexturize( $content );
}
else
{
$content = wptexturize( get_post_meta( $a['id'],$a['field'],true) );
}
ob_start();
echo $content;
return ob_get_clean();
}
The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through active theme's "functions.php" file.
This shortcode accepts two attributes "id" and "field".
To get the current post's content/body in your layout, you can use:
[get-texturize-output field="body" id="[wpv-post-id]"]
And to get the current post's custom field value, you can use:
[get-texturize-output field="wpcf-field-slug" id="[wpv-post-id]"]
Note: you'll replace "field-slug" with the actual slug of your desired custom field.
I hope this helps and please let me know how it goes.
regards,
Waqar