- 22, Oct 2024
- #1
Вот мой код:
2019-11-16T05:29:23+00:00 CRITICAL Call to undefined function wp_delete_user() in /home/test.com/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store.php on line 235
И вот мои логи:
function woo_delete_customer(){
$customer = new WC_Customer(get_current_user_id());
$val = $customer -> delete();
if($val){
$customer -> save();
$data = [];
$data['Status'] = 'Customer was successfully deleted';
return new WP_REST_Response( $data, 200 );
}
else{
new WP_Error(
'woo_deleting_problems',
'Can\'t delete customer!',
array(
'status' => 403,
)
);
}
}
Пожалуйста, помогите мне!((
#php #woocommerce-offtopic #rest-api