Last active
March 29, 2022 20:52
-
-
Save Muetze42/dd86af9a96506ad60d074331383124e2 to your computer and use it in GitHub Desktop.
WordPress WooCommerce: Add Revisions For Products
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment