XML-RPC: Correctly return deletion error message in wp_xmlrpc_server::wp_deleteTerm().

This ensures that the correct variable is used to return the `WP_Error` message from the `wp_delete_term()` attempt.

Follow-up to [20137].

Props justlevine.
See #63268.
Built from https://develop.svn.wordpress.org/trunk@60175


git-svn-id: http://core.svn.wordpress.org/trunk@59511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2025-04-19 18:56:30 +00:00
parent 7a2c67c454
commit 0d61347400
2 changed files with 2 additions and 2 deletions

View File

@@ -2345,7 +2345,7 @@ class wp_xmlrpc_server extends IXR_Server {
$result = wp_delete_term( $term_id, $taxonomy->name );
if ( is_wp_error( $result ) ) {
return new IXR_Error( 500, $term->get_error_message() );
return new IXR_Error( 500, $result->get_error_message() );
}
if ( ! $result ) {

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.9-alpha-60174';
$wp_version = '6.9-alpha-60175';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.