-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpronamic-woocommerce-subscriptions-period.php
68 lines (61 loc) · 1.77 KB
/
pronamic-woocommerce-subscriptions-period.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
65
66
67
68
<?php
/**
* Plugin Name: Pronamic period information for Woo Subscriptions
* Plugin URI: https://www.pronamic.eu/plugins/pronamic-woocommerce-subscriptions-period/
* Description: This “Woo Subscriptions” add-on ensures that a period is saved with each subscription order.
*
* Version: 1.0.0
* Requires at least: 5.9
* Requires PHP: 8.1
*
* Author: Pronamic
* Author URI: https://www.pronamic.eu/
*
* Text Domain: pronamic-woocommerce-subscriptions-period
* Domain Path: /languages/
*
* License: GPL-2.0-or-later
*
* GitHub URI: https://github.com/pronamic/pronamic-woocommerce-subscriptions-period
*
* WC requires at least: 8.0
* WC tested up to: 8.0
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2023 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WooSubscriptionsPeriod
*/
namespace Pronamic\WooSubscriptionsPeriod;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Autoload.
*/
require_once __DIR__ . '/vendor/autoload_packages.php';
/**
* Bootstrap.
*/
add_action(
'plugins_loaded',
function () {
load_plugin_textdomain( 'pronamic-woocommerce-subscriptions-period', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
}
);
$pronamic_wcsp = new Plugin();
$pronamic_wcsp->setup();
/**
* High Performance Order Storage.
*
* @link https://github.com/pronamic/pronamic-payment-gateways-fees-for-woocommerce/issues/4
* @link https://github.com/woocommerce/woocommerce/wiki/High-Performance-Order-Storage-Upgrade-Recipe-Book#declaring-extension-incompatibility
*/
add_action(
'before_woocommerce_init',
function () {
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
}
}
);