File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /.idea
12/vendor /
2- composer.lock
3+ composer.lock
Original file line number Diff line number Diff line change @@ -79,11 +79,11 @@ public function get_object_by_id( $object_id ) {
7979 }
8080
8181 private function api_call_setup () {
82- $ this ->old_user = wp_get_current_user ();
82+ $ this ->old_user = get_current_user_id ();
8383
8484 // Setup the administrator user so we can actually retrieve the order.
8585 $ user = new \WP_User ( 1 );
86- wp_set_current_user ( $ user );
86+ wp_set_current_user ( $ user-> ID );
8787
8888 WC ()->api ->includes ();
8989 WC ()->api ->register_resources ( new WC_API_Server ( '/ ' ) );
Original file line number Diff line number Diff line change @@ -79,11 +79,11 @@ public function get_object_by_id( $object_id ) {
7979 }
8080
8181 private function api_call_setup () {
82- $ this ->old_user = wp_get_current_user ();
82+ $ this ->old_user = get_current_user_id ();
8383
8484 // Setup the administrator user so we can actually retrieve the order.
8585 $ user = new \WP_User ( 1 );
86- wp_set_current_user ( $ user );
86+ wp_set_current_user ( $ user-> ID );
8787 }
8888
8989
Original file line number Diff line number Diff line change @@ -88,11 +88,11 @@ public function get_object_by_id( $object_id ) {
8888 }
8989
9090 private function api_call_setup () {
91- $ this ->old_user = wp_get_current_user ();
91+ $ this ->old_user = get_current_user_id ();
9292
9393 // Setup the administrator user so we can actually retrieve the order.
9494 $ user = new \WP_User ( 1 );
95- wp_set_current_user ( $ user );
95+ wp_set_current_user ( $ user-> ID );
9696 }
9797
9898
You can’t perform that action at this time.
0 commit comments