@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/*
|
||||
* Plugin Name: Huayi-Score For WooCommerce
|
||||
* Plugin URI: http://www.huayizhiyun.com
|
||||
* Description:
|
||||
* Version: 1.0.0
|
||||
* Author: HITSword
|
||||
* Author URI: http://www.huayizhiyun.com
|
||||
* Requires at least: 3.9
|
||||
* Tested up to: 4.0
|
||||
*
|
||||
* Text Domain: huayi
|
||||
* Domain Path: /lang/
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* 初始化插件
|
||||
*/
|
||||
function wc_huayi_score_gateway_init()
|
||||
{
|
||||
if( !class_exists('WC_Payment_Gateway') ) return;
|
||||
|
||||
load_plugin_textdomain( 'huayi_score', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
|
||||
|
||||
require_once( plugin_basename( 'class-wc-huayi-score.php' ) );
|
||||
add_filter('woocommerce_payment_gateways', 'woocommerce_huayi_score_add_gateway' );
|
||||
//add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'wc_huayi_score_plugin_edit_link' );
|
||||
}
|
||||
|
||||
add_action( 'plugins_loaded', 'wc_huayi_score_gateway_init' );
|
||||
|
||||
/**
|
||||
* Add the gateway to WooCommerce
|
||||
*
|
||||
* @access public
|
||||
* @param array $methods
|
||||
* @package WooCommerce/Classes/Payment
|
||||
* @return array
|
||||
*/
|
||||
function woocommerce_huayi_score_add_gateway( $methods )
|
||||
{
|
||||
$methods[] = 'WC_Huayi_Score';
|
||||
return $methods;
|
||||
}
|
||||
Reference in New Issue
Block a user