[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. * Enqueue scripts.
*/ */
public function admin_scripts() { public function admin_scripts() {
global $wp_query, $post, $current_user; global $wp_query, $post;
get_currentuserinfo();
$screen = get_current_screen(); $screen = get_current_screen();
$wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) ); $wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce' ) );

View File

@ -134,11 +134,7 @@ class WC_Shortcode_My_Account {
* @param string $load_address * @param string $load_address
*/ */
private static function edit_address( $load_address = 'billing' ) { private static function edit_address( $load_address = 'billing' ) {
$current_user = wp_get_current_user();
// Current user
global $current_user;
get_currentuserinfo();
$load_address = sanitize_key( $load_address ); $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 . '_' ); $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 exit; // Exit if accessed directly
} }
global $current_user;
$page_title = ( $load_address === 'billing' ) ? __( 'Billing Address', 'woocommerce' ) : __( 'Shipping Address', 'woocommerce' ); $page_title = ( $load_address === 'billing' ) ? __( 'Billing Address', 'woocommerce' ) : __( 'Shipping Address', 'woocommerce' );
get_currentuserinfo();
?> ?>
<?php wc_print_notices(); ?> <?php wc_print_notices(); ?>