PluginProbe ʕ •ᴥ•ʔ
PiWeb Product Enquiry or product catalog for WooCommerce / 2.2.34.39
PiWeb Product Enquiry or product catalog for WooCommerce v2.2.34.39
2.2.34.43 2.2.34.42 2.2.34.41 2.2.34.40 2.2.34.39 trunk 2.2.22 2.2.26 2.2.33.16 2.2.33.17 2.2.33.19 2.2.33.20 2.2.33.21 2.2.33.22 2.2.33.23 2.2.33.24 2.2.33.26 2.2.33.27 2.2.33.29 2.2.33.30 2.2.33.31 2.2.33.32 2.2.33.33 2.2.33.34 2.2.33.36 2.2.33.37 2.2.33.39 2.2.33.40 2.2.33.41 2.2.33.42 2.2.33.43 2.2.33.44 2.2.33.46 2.2.33.47 2.2.33.49 2.2.34.0 2.2.34.1 2.2.34.10 2.2.34.11 2.2.34.12 2.2.34.13 2.2.34.14 2.2.34.16 2.2.34.17 2.2.34.19 2.2.34.2 2.2.34.20 2.2.34.21 2.2.34.22 2.2.34.23 2.2.34.24 2.2.34.26 2.2.34.27 2.2.34.29 2.2.34.3 2.2.34.30 2.2.34.31 2.2.34.32 2.2.34.33 2.2.34.34 2.2.34.36 2.2.34.37 2.2.34.4 2.2.34.6 2.2.34.7 2.2.34.9
enquiry-quotation-for-woocommerce / pisol-enquiry-quotation-woocommerce.php
enquiry-quotation-for-woocommerce Last commit date
admin 2 months ago includes 2 months ago languages 2 months ago public 2 months ago LICENSE.txt 2 months ago README.txt 2 months ago index.php 2 months ago pisol-enquiry-quotation-woocommerce.php 2 months ago uninstall.php 2 months ago wpml-config.xml 2 months ago
pisol-enquiry-quotation-woocommerce.php
154 lines
1 <?php
2
3 /**
4 * The plugin bootstrap file
5 *
6 * This file is read by WordPress to generate the plugin information in the plugin
7 * admin area. This file also includes all of the dependencies used by the plugin,
8 * registers the activation and deactivation functions, and defines a function
9 * that starts the plugin.
10 *
11 * @link piwebsolution.com
12 * @since 2.2.34.39
13 * @package Pisol_Enquiry_Quotation_Woocommerce
14 *
15 * @wordpress-plugin
16 * Plugin Name: PiWeb Product Enquiry or product catalog for WooCommerce
17 * Plugin URI: https://piwebsolution.com
18 * Description: Product enquiry and quotation plugin for WooCommerce that can save enquiry and email the enquiry as well
19 * Version: 2.2.34.39
20 * Author: PI Websolution
21 * Author URI: https://www.piwebsolution.com/faq-for-woocommerce-product-enquiry-quotation/
22 * License: GPL-2.0+
23 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
24 * Text Domain: pisol-enquiry-quotation-woocommerce
25 * Domain Path: /languages
26 * WC tested up to: 10.7
27 */
28
29 // If this file is called directly, abort.
30 if ( ! defined( 'WPINC' ) ) {
31 die;
32 }
33
34 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
35
36 if(!is_plugin_active( 'woocommerce/woocommerce.php')){
37 function pi_eqw_free_notification_my_error_notice() {
38 ?>
39 <div class="error notice">
40 <p><?php esc_html_e( 'Please Install and Activate WooCommerce plugin, without that this plugin cant work', 'pisol-enquiry-quotation-woocommerce' ); ?></p>
41 </div>
42 <?php
43 }
44 add_action( 'admin_notices', 'pi_eqw_free_notification_my_error_notice' );
45 deactivate_plugins(plugin_basename(__FILE__));
46 return;
47 }
48
49 add_action('after_plugin_row_enquiry-quotation-for-woocommerce-pro/pisol-enquiry-quotation-woocommerce.php', function ($plugin_file, $plugin_data) {
50 $url = wp_nonce_url(
51 self_admin_url( 'plugins.php?action=deactivate&plugin=enquiry-quotation-for-woocommerce/pisol-enquiry-quotation-woocommerce.php' ),
52 'deactivate-plugin_enquiry-quotation-for-woocommerce/pisol-enquiry-quotation-woocommerce.php'
53 );
54 ?>
55 <tr class="plugin-update-tr">
56 <td colspan="13" class="plugin-update" style="background:rgba(255,0,0,0.5);">
57 <div style="margin: 10px;">
58 <p style="color:#FFF;"><?php echo wp_kses_post( '⚠️ Deactivate the free version of <b>Enquiry Quotation for WooCommerce</b>, then only the PRO version will work'); ?>
59 <a href="<?php echo esc_url( $url ); ?>" class="button button-secondary">
60 <?php esc_html_e( 'Deactivate Free Version', 'pisol-enquiry-quotation-woocommerce' ); ?>
61 </a>
62 </p>
63 </div>
64 </td>
65 </tr>
66 <?php
67 }, 10, 2);
68
69 if(is_plugin_active( 'enquiry-quotation-for-woocommerce-pro/pisol-enquiry-quotation-woocommerce.php')){
70 function pi_eqw_notification_my_pro_notice() {
71 ?>
72 <div class="error notice">
73 <p><?php esc_html_e( 'You have the PRO version of Enquiry plugin active, deactivate it then you can use free version', 'pisol-enquiry-quotation-woocommerce'); ?></p>
74 </div>
75 <?php
76 }
77 add_action( 'admin_notices', 'pi_eqw_notification_my_pro_notice' );
78 deactivate_plugins(plugin_basename(__FILE__));
79 return;
80 }else{
81
82 /**
83 * Declare compatible with HPOS new order table
84 */
85 add_action( 'before_woocommerce_init', function() {
86 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
87 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
88 }
89 } );
90
91 /**
92 * Currently plugin version.
93 * Start at version 2.2.34.39 and use SemVer - https://semver.org
94 * Rename this for your plugin and update it as you release new versions.
95 */
96 define( 'PISOL_ENQUIRY_QUOTATION_WOOCOMMERCE_VERSION', '2.2.34.39' );
97 define( 'PI_EQW_PRICE', '$2 / month' );
98 define( 'PI_EQW_BUY_URL', 'https://www.piwebsolution.com/cart/?add-to-cart=1734&variation_id=1735&utm_campaign=enquiry-cart&utm_source=website&utm_medium=direct-buy' );
99 define( 'PI_EQW_DELETE_SETTING', false);
100
101 /**
102 * The code that runs during plugin activation.
103 * This action is documented in includes/class-pisol-enquiry-quotation-woocommerce-activator.php
104 */
105 function activate_pisol_enquiry_quotation_woocommerce() {
106 require_once plugin_dir_path( __FILE__ ) . 'includes/class-pisol-enquiry-quotation-woocommerce-activator.php';
107 Pisol_Enquiry_Quotation_Woocommerce_Activator::activate();
108 }
109
110 /**
111 * The code that runs during plugin deactivation.
112 * This action is documented in includes/class-pisol-enquiry-quotation-woocommerce-deactivator.php
113 */
114 function deactivate_pisol_enquiry_quotation_woocommerce() {
115 require_once plugin_dir_path( __FILE__ ) . 'includes/class-pisol-enquiry-quotation-woocommerce-deactivator.php';
116 Pisol_Enquiry_Quotation_Woocommerce_Deactivator::deactivate();
117 }
118
119 register_activation_hook( __FILE__, 'activate_pisol_enquiry_quotation_woocommerce' );
120 register_deactivation_hook( __FILE__, 'deactivate_pisol_enquiry_quotation_woocommerce' );
121
122 /**
123 * The core plugin class that is used to define internationalization,
124 * admin-specific hooks, and public-facing site hooks.
125 */
126 require plugin_dir_path( __FILE__ ) . 'includes/class-pisol-enquiry-quotation-woocommerce.php';
127
128 function pisol_eqw_plugin_link( $links ) {
129 $links = array_merge( array(
130 '<a href="' . esc_url( admin_url( '/admin.php?page=pisol-enquiry-quote' ) ) . '">' . __( 'Settings', 'pisol-enquiry-quotation-woocommerce' ) . '</a>',
131 '<a style="color:#0a9a3e; font-weight:bold;" target="_blank" href="' . esc_url(PI_EQW_BUY_URL) . '">' . __( 'Buy PRO Version','pisol-enquiry-quotation-woocommerce' ) . '</a>'
132 ), $links );
133 return $links;
134 }
135 add_action( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'pisol_eqw_plugin_link' );
136
137 /**
138 * Begins execution of the plugin.
139 *
140 * Since everything within the plugin is registered via hooks,
141 * then kicking off the plugin from this point in the file does
142 * not affect the page life cycle.
143 *
144 * @since 1.0.0
145 */
146 function run_pisol_enquiry_quotation_woocommerce() {
147
148 $plugin = new Pisol_Enquiry_Quotation_Woocommerce();
149 $plugin->run();
150
151 }
152 run_pisol_enquiry_quotation_woocommerce();
153
154 }