Initial implementation of a WooCommerce payment gateway plugin supporting Alipay fund authorization (preauth), including fund freeze, capture, and unfreeze features. Adds gateway registration, WooCommerce Blocks support, admin actions for capture/unfreeze, and frontend assets. Includes documentation and plugin bootstrap.
23 lines
864 B
PHP
23 lines
864 B
PHP
<?php
|
|
/*
|
|
* Plugin Name: Woo Alipay - Fund Authorization (Preauth)
|
|
* Plugin URI: https://woocn.com/
|
|
* Description: 支持支付宝资金预授权(冻结/解冻/转支付)。需要先安装并启用 Woo Alipay 与 WooCommerce。
|
|
* Version: 0.1.0
|
|
* Author: WooCN.com
|
|
* Author URI: https://woocn.com/
|
|
* Requires Plugins: woocommerce, woo-alipay
|
|
* Text Domain: woo-alipay-fund-auth
|
|
* Domain Path: /languages
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) { exit; }
|
|
|
|
require_once plugin_dir_path( __FILE__ ) . 'bootstrap.php';
|
|
|
|
// 设置页快捷入口
|
|
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), function( $links ) {
|
|
$url = admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=alipay_fund_auth' );
|
|
$links[] = '<a href="' . esc_url( $url ) . '">' . esc_html__( 'Settings', 'woo-alipay-fund-auth' ) . '</a>';
|
|
return $links;
|
|
} );
|