Created
April 8, 2022 10:51
-
-
Save jhimross/011e5aecb15979101a852808f067112d to your computer and use it in GitHub Desktop.
Change min/max date for admin
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
/** | |
* Change min/max date for admin | |
* | |
* @return void | |
*/ | |
function iconic_admin_set_min_date() { | |
global $iconic_wds; | |
if ( empty( $iconic_wds ) || ! current_user_can( 'manage_woocommerce' ) ) { | |
return; | |
} | |
$iconic_wds->settings['datesettings_datesettings_minimum'] = 0; | |
$iconic_wds->settings['datesettings_datesettings_maximum'] = 100; | |
} | |
add_action( 'wp_loaded', 'iconic_admin_set_min_date', 11 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment