-
Notifications
You must be signed in to change notification settings - Fork 8
/
woocommerce-parcelas.php
executable file
·48 lines (39 loc) · 1.23 KB
/
woocommerce-parcelas.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
<?php
/**
* Plugin Name: WooCommerce Parcelas
* Plugin URI: https://wordpress.org/plugins/woocommerce-parcelas/
* Description: Adiciona quantidade de parcelas e o valor de cada parcela nas páginas que listam os produtos e na página individual do produto.
* Author: Filipe Seabra
* Author URI: https://filipeseabra.me/
* Version: 1.3.5
* Text Domain: wc-parcelas
* Domain Path: /languages/
*/
use WcParcelas\App\Main;
defined( 'ABSPATH' ) || exit;
try {
if ( ! file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
throw new Exception( sprintf( 'The autoload file was not found. File: "%s".', __DIR__ . '/vendor/autoload.php' ) );
}
require_once __DIR__ . '/vendor/autoload.php';
} catch ( Exception $e ) {
error_log( $e->getMessage() );
return;
}
define( 'WC_PARCELAS_PATH', plugin_dir_path( __FILE__ ) );
define( 'WC_PARCELAS_URL', plugin_dir_url( __FILE__ ) );
define( 'WC_PARCELAS_BASENAME', plugin_basename( __FILE__ ) );
define( 'WC_PARCELAS_VERSION', '1.3.5' );
define( 'WC_PARCELAS_NAME', 'WooCommerce Parcelas' );
define( 'WC_PARCELAS_SLUG', 'wc-parcelas' );
/**
* @return Main
*/
function wcParcelas(): ?Main {
static $object = null;
if ( ! isset( $object ) ) {
$object = new Main();
}
return $object;
}
wcParcelas();