??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/renovaid.co.uk/wp-content/plugins/latepoint/lib/abilities/orders/delete-order.php
⬅ Kembali
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class LatePointAbilityDeleteOrder extends LatePointAbstractOrderAbility {
protected function configure(): void {
$this->id = 'latepoint/delete-order';
$this->label = __( 'Delete order', 'latepoint' );
$this->description = __( 'Permanently deletes an order and its associated invoices. This cannot be undone.', 'latepoint' );
$this->permission = 'booking__delete';
$this->read_only = false;
$this->destructive = true;
$this->idempotent = false;
}
public function get_input_schema(): array {
return [
'type' => 'object',
'properties' => [
'id' => [
'type' => 'integer',
'description' => __( 'Order ID to delete.', 'latepoint' ),
],
],
'required' => [ 'id' ],
];
}
public function get_output_schema(): array {
return [
'type' => 'object',
'properties' => [
'deleted' => [ 'type' => 'boolean' ],
'id' => [ 'type' => 'integer' ],
],
];
}
public function execute( array $args ) {
$order = new OsOrderModel( (int) $args['id'] );
if ( $order->is_new_record() ) {
return new WP_Error( 'not_found', __( 'Order not found.', 'latepoint' ), [ 'status' => 404 ] );
}
$id = (int) $order->id;
if ( ! $order->delete() ) {
return new WP_Error( 'delete_failed', __( 'Failed to delete order.', 'latepoint' ), [ 'status' => 422 ] );
}
return [
'deleted' => true,
'id' => $id,
];
}
}
Nama
Tipe
Ukuran
Diubah
Aksi
🐘 abstract-order-ability.php
php
3.6 KB
2026-03-10 11:15
🐘 change-invoice-status.php
php
1.6 KB
2026-03-10 11:15
🐘 change-order-status.php
php
1.5 KB
2026-03-10 11:15
🐘 create-invoice.php
php
2 KB
2026-03-10 11:15
🐘 create-order.php
php
1.9 KB
2026-03-10 11:15
🐘 delete-order.php
php
1.4 KB
2026-03-10 11:15
🐘 get-invoice.php
php
1 KB
2026-03-10 11:15
🐘 get-order-price-breakdown.php
php
1.6 KB
2026-03-10 11:15
🐘 get-order.php
php
1 KB
2026-03-10 11:15
🐘 get-transaction.php
php
1.1 KB
2026-03-10 11:15
🐘 list-invoices.php
php
2.4 KB
2026-03-10 11:15
🐘 list-orders.php
php
2.5 KB
2026-03-10 11:15
🐘 list-transactions.php
php
1.9 KB
2026-03-10 11:15
🐘 refund-transaction.php
php
1.5 KB
2026-03-10 11:15
🐘 update-order.php
php
1.9 KB
2026-03-10 11:15