-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwoocommerce-pagarme-pix-payment.php
64 lines (56 loc) · 2.14 KB
/
woocommerce-pagarme-pix-payment.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Pix Automático com Pagarme para WooCommerce
*
* @link https://github.com/marcosgomesneto/woocommerce-pagarme-pix-payment
* @since 1.1.0
* @package WC_Pagarme_Pix_Payment
*
* @wordpress-plugin
* Plugin Name: Pix Automático com Pagarme para WooCommerce
* Plugin URI: https://github.com/marcosgomesneto/woocommerce-pagarme-pix-payment
* Description: Receba pagamentos via PIX no WooCommerce com a Pagar-me de forma automática sem precisar de comprovantes de pagamento.
* Version: 2.2.1
* Requires at least: 5.2
* Requires PHP: 7.0
* WC requires at least: 3.0
* WC tested up to: 9.3.1
* Author: Marcos Gomes Neto
* Author URI: https://github.com/marcosgomesneto
* Text Domain: wc-pagarme-pix-payment
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
defined( 'ABSPATH' ) || exit;
//Define globals
define( 'WC_PAGARME_PIX_PAYMENT_PLUGIN_NAME', 'wc-pagarme-pix-payment' );
define( 'WC_PAGARME_PIX_PAYMENT_PLUGIN_VERSION', '2.2.1' );
define( 'WC_PAGARME_PIX_PAYMENT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'WC_PAGARME_PIX_PAYMENT_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
define( 'WC_PAGARME_PIX_PAYMENT_BASE_NAME', plugin_basename( __FILE__ ) );
define( 'WC_PAGARME_PIX_PAYMENT_DIR_NAME', dirname( plugin_basename( __FILE__ ) ) );
define( 'WC_PAGARME_PIX_PAYMENT_FILE_NAME', __FILE__ );
function deactivate_wc_pagarme_pix_payment() {
$timestamp = wp_next_scheduled( 'wc_pagarme_pix_payment_schedule' );
wp_unschedule_event( $timestamp, 'wc_pagarme_pix_payment_schedule' );
}
register_deactivation_hook( __FILE__, 'deactivate_wc_pagarme_pix_payment' );
require WC_PAGARME_PIX_PAYMENT_PLUGIN_PATH . 'vendor/autoload.php';
/**
* Global function-holder. Works similar to a singleton's instance().
*
* @since 1.0.0
*
* @return WCPagarmePixPayment\Core
*/
function wc_pagarme_pix_payment() {
/**
* @var \WCPagarmePixPayment\Core
*/
static $core;
if ( ! isset( $core ) ) {
$core = new \WCPagarmePixPayment\Core();
}
return $core;
}
wc_pagarme_pix_payment();