// wp-config.php
define( 'WP_POST_REVISIONS', 5 );
// or per post type, from a plugin
add_filter( 'wp_revisions_to_keep', function ( $num, $post ) {
return 'product' === $post->post_type ? 2 : $num;
}, 10, 2 );
// wp-config.php
define( 'WP_POST_REVISIONS', 5 );
// or per post type, from a plugin
add_filter( 'wp_revisions_to_keep', function ( $num, $post ) {
return 'product' === $post->post_type ? 2 : $num;
}, 10, 2 );