- Trait-split content-pay, vip-service, balance-service, order-repository - Procedural split of user module into user-parts/* - Split scripts enqueue_public into part-1b/1c; settings bulk trait - Bootstrap: explicit notifications, widgets glob-only, home-modules init - ADR: freeze domain placement for pay/revenue/notify boundaries
37 lines
783 B
PHP
37 lines
783 B
PHP
<?php
|
|
/**
|
|
* AKSRT Content Pay — post/_aksrt_pay cashier + resource orders.
|
|
*
|
|
* Server-side amount always from aksrt_get_user_pay_price().
|
|
* product_type = ORDER_PRODUCT_RESOURCE (post_id).
|
|
*
|
|
* @package AKSRT
|
|
*/
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
class AKSRT_Content_Pay {
|
|
use AKSRT_Content_Pay_Rest;
|
|
use AKSRT_Content_Pay_Orders;
|
|
use AKSRT_Content_Pay_Helpers;
|
|
|
|
private static $instance = null;
|
|
|
|
|
|
|
|
public static function get_instance(): self {
|
|
if (null === self::$instance) {
|
|
self::$instance = new self();
|
|
}
|
|
return self::$instance;
|
|
}
|
|
|
|
|
|
|
|
public function init(): void {
|
|
add_action('rest_api_init', [$this, 'register_routes']);
|
|
add_action('aksrt_order_paid', [$this, 'on_order_paid'], 15, 2);
|
|
}
|
|
|
|
}
|