Support » Plugin: Mandatory Excerpts for WordPress » Woocommerce

  • How to make Mandatory Excerpts for WordPress to work with Woocommerce to make excerpt (product short description) mandatory?

    I tried this without success
    $valid_post_types = apply_filters( ‘mandatory_excerpt_post_types’, array( ‘post’, ‘product’ ) );

    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter dviolante

    (@dviolante)

    Found how, just after installed plugin i added this snippet to my child theme

    function require_excerpt_only_in_product() {
    return [‘product’];
    }
    add_filter( ‘mandatory_excerpt_post_types’, ‘require_excerpt_only_in_product’);

    And it is working.

Viewing 1 replies (of 1 total)
  • The topic ‘Woocommerce’ is closed to new replies.