Created
June 10, 2014 06:34
-
-
Save simonlk/395c435532bd93236472 to your computer and use it in GitHub Desktop.
Modify WooCommerce subscription start date without debug mode
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
/* 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