【发布时间】:2021-06-01 10:50:19
【问题描述】:
我正在实现一个扩展 Woocommerce 的自定义支付插件。当用户点击结帐按钮时,我需要获取一个二维码并将其显示在弹出窗口中。
public function process_payment() {
...
try {
$response = json_decode($this->getQr('url'));
}
catch (Exception $e) {
echo $e->getMessage();
die();
}
$url = $response->url;
$qr = $response->qr_code;
}
我收到了回复,但不知道如何继续。是否需要在调用process_payment 函数之前捕获按钮点击?
【问题讨论】:
标签: wordpress woocommerce popup