-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathwc-arca.php
42 lines (34 loc) · 1.1 KB
/
wc-arca.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/*
Plugin Name: ArCa - WooCommerce Gateway
Plugin URI: http://www.hexdivision.com/
Description: ArCa payment gateway for WooCommerce
Version: 1
Author: HexDivision
Author URI: http://www.hexdivision.com/
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
// Include our Gateway Class and Register Payment Gateway with WooCommerce
add_action('plugins_loaded', 'woocommerce_arca_init', 0);
function woocommerce_arca_init()
{
if (!class_exists('WC_Payment_Gateway')) return;
include_once('wc-arca-gateway.php');
add_filter('woocommerce_payment_gateways', 'add_arca_gateway');
/**
* Add the gateway to WooCommerce
**/
function add_arca_gateway($methods)
{
$methods[] = 'WC_ArCa';
return $methods;
}
}
add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'woocommerce_arca_action_links');
function woocommerce_arca_action_links($links)
{
$plugin_links = array(
'<a href="' . admin_url('admin.php?page=wc-settings&tab=checkout') . '">' . __('Settings', 'arca') . '</a>',
);
return array_merge($plugin_links, $links);
}