PluginProbe
Power Coupons for WooCommerce / trunk
Power Coupons for WooCommerce vtrunk
1.0.7 1.0.6 1.0.5 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4
power-coupons / power-coupons.php

power-coupons.php in Power Coupons for WooCommerce trunk, at power-coupons.php

76 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Power Coupons for WooCommerce
4 * Plugin URI: https://brainstormforce.com/
5 * Description: Power Coupons is an advanced cart discount plugin for WooCommerce that helps you create discount rules, auto-apply coupons, and engaging cart incentives to boost conversions.
6 * Version: 1.0.7
7 * Author: Brainstorm Force
8 * Author URI: https://www.brainstormforce.com
9 * License: GPL v2 or later
10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
11 * Text Domain: power-coupons
12 * Domain Path: /languages
13 * Requires at least: 6.0
14 * Requires PHP: 7.4
15 * WC requires at least: 3.0
16 * WC tested up to: 8.0
17 *
18 * Requires Plugins: woocommerce
19 *
20 * @package Power_Coupons
21 */
22
23 // Exit if accessed directly.
24 if ( ! defined( 'ABSPATH' ) ) {
25 exit;
26 }
27
28 /**
29 * Set constants
30 */
31 define( 'POWER_COUPONS_VERSION', '1.0.7' );
32 define( 'POWER_COUPONS_FILE', __FILE__ );
33 define( 'POWER_COUPONS_BASE', plugin_basename( POWER_COUPONS_FILE ) );
34 define( 'POWER_COUPONS_DIR', plugin_dir_path( POWER_COUPONS_FILE ) );
35 define( 'POWER_COUPONS_URL', plugins_url( '/', POWER_COUPONS_FILE ) );
36 define( 'POWER_COUPONS_PLUGIN_FILE', POWER_COUPONS_FILE );
37
38 if ( ! defined( 'POWER_COUPONS_ONBOARDING_USER_SUB_WORKFLOW_URL' ) ) {
39 define( 'POWER_COUPONS_ONBOARDING_USER_SUB_WORKFLOW_URL', 'https://webhook.ottokit.com/ottokit/ae829303-5da9-4daf-85f5-bbda71586f8c' );
40 }
41
42 if ( ! defined( 'POWER_COUPONS_NPS_WEBHOOK_URL' ) ) {
43 define( 'POWER_COUPONS_NPS_WEBHOOK_URL', 'https://webhook.ottokit.com/ottokit/04399f32-0e78-40b1-8a93-6452ea18168c' );
44 }
45
46 /**
47 * Load the top level files.
48 */
49 require_once POWER_COUPONS_DIR . 'includes/class-power-coupons-activator.php';
50 require_once POWER_COUPONS_DIR . 'includes/class-power-coupons-loader.php';
51
52 /**
53 * Register activation and deactivation hooks
54 */
55 register_activation_hook( POWER_COUPONS_FILE, array( 'Power_Coupons\Includes\Power_Coupons_Activator', 'activate' ) );
56 register_deactivation_hook( POWER_COUPONS_FILE, array( 'Power_Coupons\Includes\Power_Coupons_Activator', 'deactivate' ) );
57
58 /**
59 * Begins execution of the plugin.
60 *
61 * @since 1.0.0
62 * @return object initialized object of class.
63 */
64 function power_coupons() {
65 return Power_Coupons\Power_Coupons_Loader::get_instance();
66 }
67
68 // Kicking this off by calling 'get_instance()' method.
69 power_coupons();
70
71 // The post-activation redirect lives in Power_Coupons_Admin_Settings::maybe_redirect_to_onboarding().
72 // It used to be duplicated here as well, and because this file is parsed before the class
73 // registers its own hook, this copy always ran first on admin_init and consumed the transient —
74 // so the capability, bulk-activation and already-completed checks over there never ran at all.
75
76