This repository has been archived on 2026-04-06. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
woo-alipay-profitsharing/woo-alipay-profitsharing.php
feibisi 875cd538e2 Add initial Woo Alipay Profit Sharing plugin files
Introduce the Woo Alipay Profit Sharing plugin for WooCommerce, including core bootstrap, admin interfaces, service logic, job management, compensation handling, and JavaScript assets. This initial commit provides support for Alipay profit sharing with configurable settlement policies, receiver management, rule configuration, job queueing, and admin UI integration.
2025-10-05 12:05:32 +08:00

26 lines
907 B
PHP

<?php
/*
* Plugin Name: Woo Alipay - Profit Sharing (分账/分润)
* Plugin URI: https://woocn.com/
* Description: 为 WooCommerce 订单提供支付宝分账/结算能力(延迟/即时)。需要先安装并启用 Woo Alipay 与 WooCommerce。
* Version: 0.1.0
* Author: WooCN.com
* Author URI: https://woocn.com/
* Requires Plugins: woocommerce, woo-alipay
* Text Domain: woo-alipay-profitsharing
* Domain Path: /languages
*/
if ( ! defined( 'ABSPATH' ) ) { exit; }
register_activation_hook( __FILE__, function() {
// Ensure admin has capability to manage profit sharing.
if ( function_exists( 'get_role' ) ) {
$role = get_role( 'administrator' );
if ( $role && ! $role->has_cap( 'manage_alipay_profitsharing' ) ) {
$role->add_cap( 'manage_alipay_profitsharing', true );
}
}
} );
require_once plugin_dir_path( __FILE__ ) . 'bootstrap.php';