[2.5] get_currentuserinfo() is deprecated in WP 4.5

This commit is contained in:
Mike Jolley 2016-01-18 14:41:58 +00:00
parent c505b37ec5
commit 0049415797
3 changed files with 3 additions and 14 deletions

View File

@ -77,9 +77,7 @@ class WC_Admin_Assets {
* Enqueue scripts.
*/
public function admin_scripts() {
global $wp_query, $post, $current_user;
get_currentuserinfo();
global $wp_query, $post;
$screen = get_current_screen();
$wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) );

View File

@ -134,11 +134,7 @@ class WC_Shortcode_My_Account {
* @param string $load_address
*/
private static function edit_address( $load_address = 'billing' ) {
// Current user
global $current_user;
get_currentuserinfo();
$current_user = wp_get_current_user();
$load_address = sanitize_key( $load_address );
$address = WC()->countries->get_address_fields( get_user_meta( get_current_user_id(), $load_address . '_country', true ), $load_address . '_' );

View File

@ -19,12 +19,7 @@ if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
global $current_user;
$page_title = ( $load_address === 'billing' ) ? __( 'Billing Address', 'woocommerce' ) : __( 'Shipping Address', 'woocommerce' );
get_currentuserinfo();
$page_title = ( $load_address === 'billing' ) ? __( 'Billing Address', 'woocommerce' ) : __( 'Shipping Address', 'woocommerce' );
?>
<?php wc_print_notices(); ?>