Hi Sam,
Glad to hear that.
1) Since WooCommerce pages are “Products” pages, you really don’t want to use the Schema plugin on them, especially that there is no support for “Product” markup in Schema plugin yet! (This will require some kind of integration and extra coding)
The recommended option here would be disable Schema on WooCommerce products type.
Another thing that may work, but I am not sure if it will cause errors in markup (this mostly because there is no integration between both plugins). Try overriding the Schema type output by setting it to “Product” and see if this solves the duplication issue ( I haven’t tested this):
add_filter( 'schema_wp_types', 'schema_wp_new_add_schema_type_7623456' );
/**
* Add New type to Schema Types options
*
* @since 1.0
*/
function schema_wp_new_add_schema_type_7623456( $options ) {
// Change 'NewType' to the actual schema.org type you want to add
// Example: Event, Product, JobPosting, ...etc.
$options['NewType'] = array (
'label' => __('NewType'),
'value' => 'NewType'
);
return $options;
}
Here is a link to the code gist.
2) Luckily, there is a filter for that, you can try this in your theme’s functions.php file, this will override the Schema describtion output and replace it with full content of the post:
add_filter( 'schema_wp_filter_description', 'schema_wp_override_description_345675432567' );
/*
* Override Schema description value, use full content instead
*/
function schema_wp_override_description_345675432567( $schema_output ) {
global $post;
// get post id
$post_id = $post->ID;
// get post
$content_post = get_post($post_id);
// get post content
$content = $content_post->post_content;
// remove shortcodes
$content = str_replace(']]>', ']]>', $content);
// remove html tags
$content = wp_strip_all_tags($content);
// return new description
return $content;
}
Here is a link to the code gist.
P.S. I’ve just added a new filter to override the description words count, but this will be part of the next plugin update.
I hope this answers your questions.