feat(forum): multi-gateway cashier for pay-visibility topics
Replace balance-only AJAX topic purchase with AKSRT_Topic_Pay REST cashier (resource orders + Payment_Gateway), reuse cms-download modal, and unlock on aksrt_order_paid.
This commit is contained in:
@@ -661,8 +661,12 @@ trait AKSRT_Scripts_Part_1b {
|
||||
$enqueue_module('resource-archive');
|
||||
}
|
||||
|
||||
// 单篇资源 / 付费内容 / 独立下载页:下载 + 收银台脚本
|
||||
if ($is_single_resource || $is_paid_content_single || $is_download_file_page) {
|
||||
// 付费论坛主题:多网关收银台(与内容共用 cms-download.js)
|
||||
$is_pay_forum_topic = is_singular('aksrt_forum_topic')
|
||||
&& sanitize_key((string) get_post_meta(get_queried_object_id(), '_aksrt_visibility', true)) === 'pay';
|
||||
|
||||
// 单篇资源 / 付费内容 / 独立下载页 / 付费主题:下载 + 收银台脚本
|
||||
if ($is_single_resource || $is_paid_content_single || $is_download_file_page || $is_pay_forum_topic) {
|
||||
$cms_download_js_path = get_template_directory() . '/assets/js/cms-download.js';
|
||||
wp_enqueue_script(
|
||||
'aksrt-cms-download',
|
||||
|
||||
Reference in New Issue
Block a user