MainWP Community

Enable Revisions on Products in WooCommerce

Enable revisions on products if using WooCommerce on your child site.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'woocommerce_register_post_type_product', 'wc_add_revision_support' );

function wc_add_revision_support( $args ) {
     $args['supports'][] = 'revisions';

     return $args;
}

function wpcodex_add_excerpt_support_for_pages() {
    add_post_type_support( 'product', 'revisions' );
}
add_action( 'init', 'wpcodex_add_excerpt_support_for_pages' );
1 Like

Will only track post title change and post content changes, none of the product data changes will be tracked in revisions.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.