Skip to:

Opened 5 years ago

Closed 5 years ago

#8123 closed defect (bug) (fixed)

update_user_status() is deprecated in WordPress 5.3.0

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 5.0.0 Priority: normal
Severity: normal Version:
Component: Members Keywords: has-patch 2nd-opinion


See #WP45708. The recommended function to use instead is wp_update_user().

We are using this function in bp_core_process_spammer_status() for multisite configs. In order to give us some time to find the better approach to fix this, I am going to use setExpectedDeprecated in the 8 failing tests.

Attachments (2)

8123.patch (6.3 KB) - added by imath 5 years ago.
8123.2.patch (6.5 KB) - added by imath 5 years ago.

Download all attachments as: .zip

Change History (10)

#1 @imath
5 years ago

In 12422:

Use setExpectedDeprecated for the 8 failing tests using update_user_status

See #8123

#2 @imath
5 years ago

This commit 12423 belongs to this ticket.

5 years ago

#3 @imath
5 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

8123.patch is passing the unit test, It still needs "human" testing on a multisite config.

#4 @espellcaste
5 years ago

Why are you checking wp_get_registered_image_subsizes? If there is a reason, I'd document that so that in the future, someone understand why.

5 years ago

#5 @imath
5 years ago

  • Component changed from Core to Members
  • Keywords 2nd-opinion added; needs-testing removed

@espellcaste That's the only function that has been introduced in WordPress 5.3.0 so far :) I agree it's a little confusing. So maybe we should use bp_get_major_wp_version() < 5.3 instead? Like what I'm doing in 8123.2.patch.

I've just tested the patch on a Multisite config. I confirm it's behaving like it should. Should we include this in BuddyPress 5.0.0 or wait until WordPress 5.3.0 is released?

#6 @espellcaste
5 years ago

@imath I'd rather use 8123.2. It is more clear what's happening for future devs.

I see no problem in including in 5.0.0 now.

This ticket was mentioned in Slack in #buddypress by imath. View the logs.

5 years ago

#8 @imath
5 years ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 12450:

Anticipate the deprecation in WordPress 5.3 of update_user_status()

Introduce bp_core_update_member_status() in order to wrap wp_update_user() with needed argument to spam a user on multisite configurations.

Props espellcaste

Fixes #8123

Note: See TracTickets for help on using tickets.