fix(users): restore WeChat template notification flow

This commit is contained in:
kate522 committed 2026-11-10 20:54:24 +08:00
1 parent 30ceab4615
commit 7fe26d3fff
18 files changed
+1051 -763

No files matched your search

+10
View File
@@ -90,6 +90,16 @@ final class WeixinGzh {
return false;
}
public function access_token(): string {
$config = self::settings();
$appid = trim((string) ($config['appid'] ?? ''));
$secret = trim((string) ($config['appsecret'] ?? ''));
if ($appid === '' || $secret === '') {
return '';
}
return $this->get_access_token($appid, $secret);
}
public function rest_qrcode_login(\WP_REST_Request $request) {
$limited = $this->rate_limit('qr-create', 12, MINUTE_IN_SECONDS, 2);
if ($limited) {