-
Notifications
You must be signed in to change notification settings - Fork 2
/
woocommerce-plugin-venezuela.php
43 lines (33 loc) · 1.37 KB
/
woocommerce-plugin-venezuela.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
43
<?php
/*
Plugin Name: Woocommerce Plugin Venezuela
Plugin URI: https://www.jorgelbou-saad.com
Description: Plugin para registrar pagos de pedidos con Bolivares a traves de Pago movil, transferencias bancarias y zelle
Version: 1.0.o
Author: Jorge Luis Bou-saad
Author URI: https://www.jorgelbou-saad.com
License: GPLv2
*/
//SE INICIALIZA PLUGIN CON DATOS QUE DEBEN ESTAR DISPONIBLES EN BASE DE DATOS (BANCOS)
require_once plugin_dir_path(__FILE__) . "/src/ActivatePlugin.php";
function plugin_init(){
global $wpdb;
ActivatePlugin::$wpdb = $wpdb;
ActivatePlugin::createBanks();
}
register_activation_hook(__FILE__,"plugin_init");
add_filter( 'woocommerce_payment_gateways', 'test_add_gateway_class' );
function test_add_gateway_class( $gateways ) {
//$gateways[] = 'WC_Test_Gateway'; // your class name is here
$gateways[] = 'WC_Pago_Movil_Venezuela';
$gateways[] = 'WC_Transferencias_Venezuela';
$gateways[] = 'WC_Zelle_Venezuela';
return $gateways;
}
add_action( 'plugins_loaded', 'init_gateway_class' );
function init_gateway_class() {
//require_once plugin_dir_path( __FILE__ ) . '/src/WC_Test_Gateway.php';
require_once plugin_dir_path( __FILE__ ) . '/src/WC_Pago_Movil_Venezuela.php';
require_once plugin_dir_path(__FILE__) . "/src/WC_Transferencias_Venezuela.php";
require_once plugin_dir_path(__FILE__) . "/src/WC_Zelle_Venezuela.php";
}