Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonlk/395c435532bd93236472 to your computer and use it in GitHub Desktop.
Save simonlk/395c435532bd93236472 to your computer and use it in GitHub Desktop.
Modify WooCommerce subscription start date without debug mode
/* Add _subscription_start_date back to the viewable order meta data */
add_filter( 'woocommerce_hidden_order_itemmeta', 'theme_hide_order_itemmeta' );
function theme_hide_order_itemmeta( $hidden_meta_keys ) {
if ( ! defined( 'WCS_DEBUG' ) || true !== WCS_DEBUG ) {
if(($key = array_search('_subscription_start_date', $hidden_meta_keys)) !== false) {
unset($hidden_meta_keys[$key]);
}
}
return $hidden_meta_keys;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment