PluginProbe
Additional Terms Lite for WooCommerce / 1.6.3
Additional Terms Lite for WooCommerce v1.6.3
1.7.3 1.7.2.1 trunk 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.6.0 1.6.1 1.6.2 1.6.3 All 35 releases
woo-additional-terms / woo-additioanl-terms.php

woo-additioanl-terms.php in Additional Terms Lite for WooCommerce 1.6.3, at woo-additioanl-terms.php

106 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The `Woo Additional Terms` bootstrap file.
4 *
5 * This file is read by WordPress to generate the plugin information in the plugin
6 * admin area. This file also includes all of the dependencies used by the plugin,
7 * registers the activation and deactivation functions, and defines a function
8 * that starts the plugin.
9 *
10 * You can redistribute this plugin/software and/or modify it under
11 * the terms of the GNU General Public License as published by the
12 * Free Software Foundation, either version 3 of the License, or
13 * any later version.
14 *
15 * @link https://www.mypreview.one
16 *
17 * @since 1.0.0
18 *
19 * @package woo-additional-terms
20 *
21 * @author MyPreview (Github: @mahdiyazdani, @gooklani, @mypreview)
22 *
23 * @copyright © 2015 - 2023 MyPreview. All Rights Reserved.
24 *
25 * @wordpress-plugin
26 * Plugin Name: Woo Additional Terms
27 * Plugin URI: https://mypreview.one/woo-additional-terms
28 * Description: Improve your checkout process by adding an extra checkbox for terms and conditions. Keep track of acceptance to ensure transparency and security.
29 * Version: 1.6.3
30 * Author: MyPreview
31 * Author URI: https://mypreview.one/woo-additional-terms
32 * Requires at least: 5.9
33 * Requires PHP: 7.4
34 * License: GPL-3.0
35 * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
36 * Text Domain: woo-additional-terms
37 * Domain Path: /languages
38 * WC requires at least: 5.5
39 * WC tested up to: 8.0
40 */
41
42 use Woo_Additional_Terms\Plugin;
43 use WC_Install_Notice\Nag;
44
45 if ( ! defined( 'ABSPATH' ) ) {
46 header( 'Status: 403 Forbidden' );
47 header( 'HTTP/1.1 403 Forbidden' );
48 exit;
49 }
50
51 /**
52 * Loads the PSR-4 autoloader implementation.
53 *
54 * @since 1.6.0
55 *
56 * @return void
57 */
58 require_once untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/vendor/autoload.php';
59
60 /**
61 * Initialize the plugin.
62 *
63 * @since 1.6.0
64 *
65 * @return mixed|Plugin
66 */
67 function woo_additional_terms() {
68
69 static $instance;
70
71 if ( is_null( $instance ) ) {
72 $version = get_file_data( __FILE__, array( 'Version' => 'Version' ), false );
73 $instance = new Plugin( $version['Version'] ?? '1.0.0', __FILE__ );
74 }
75
76 return $instance;
77 }
78
79 /**
80 * Load the plugin after all plugins are loaded.
81 *
82 * @since 1.6.0
83 *
84 * @return void
85 */
86 function woo_additional_terms_load(): void {
87
88 // Fetch the instance.
89 woo_additional_terms();
90 }
91
92 if ( ! (
93 ( new Nag() )
94 ->set_file_path( __FILE__ )
95 ->set_plugin_name( 'Woo Additional Terms' )
96 ->does_it_requires_nag()
97 )
98 ) {
99
100 add_action( 'woocommerce_loaded', 'woo_additional_terms_load', 20 );
101
102 // Register activation and deactivation hooks.
103 register_activation_hook( __FILE__, array( 'Woo_Additional_Terms\\Installer', 'activate' ) );
104 register_deactivation_hook( __FILE__, array( 'Woo_Additional_Terms\\Installer', 'deactivate' ) );
105 }
106