| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: seQura |
| 4 |
* Plugin URI: https://sequra.es/ |
| 5 |
* Description: Ofrece las opciones de pago con seQura |
| 6 |
* Version: 2.0.11 |
| 7 |
* Author: "seQura Tech" <wordpress@sequra.com> |
| 8 |
* Author URI: https://sequra.com/ |
| 9 |
* WC requires at least: 4.0 |
| 10 |
* WC tested up to: 8.9.1 |
| 11 |
* Text Domain: sequra |
| 12 |
* Domain Path: /i18n/languages/ |
| 13 |
* Requires at least: 5.9 |
| 14 |
* Requires PHP: 7.3 |
| 15 |
* |
| 16 |
* Copyright (C) 2023 seQura Tech |
| 17 |
* |
| 18 |
* License: GPL v3 |
| 19 |
* |
| 20 |
* This program is free software: you can redistribute it and/or modify |
| 21 |
* it under the terms of the GNU General Public License as published by |
| 22 |
* the Free Software Foundation, either version 3 of the License, or |
| 23 |
* (at your option) any later version. |
| 24 |
* |
| 25 |
* This program is distributed in the hope that it will be useful, |
| 26 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 27 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 28 |
* GNU General Public License for more details. |
| 29 |
* |
| 30 |
* You should have received a copy of the GNU General Public License |
| 31 |
* along with this program. If not, see <http://www.gnu.org/licenses/> |
| 32 |
* |
| 33 |
* @package sequra |
| 34 |
*/ |
| 35 |
|
| 36 |
// Make sure old WooCommerce seQura is not installed. |
| 37 |
if ( ! defined( 'WC_SEQURA_PLG_PATH' ) && ! file_exists( WP_PLUGIN_DIR . '/woocommerce-sequra' ) && ! file_exists( WP_PLUGIN_DIR . '/woocommerce-sequracheckout' ) ) { |
| 38 |
define( 'SEQURA_VERSION', '2.0.11' ); |
| 39 |
define( 'WC_SEQURA_PLG_PATH', WP_PLUGIN_DIR . '/' . basename( plugin_dir_path( __FILE__ ) ) . '/' ); |
| 40 |
define( 'SEQURA_SIGNUP_URL', 'https://share.hsforms.com/1J2S1J2NPTi-pZERcgJPOVw1c4yg' ); |
| 41 |
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'sequrapayment_action_links' ); |
| 42 |
register_activation_hook( __FILE__, 'sequra_activation' ); |
| 43 |
require_once WC_SEQURA_PLG_PATH . 'gateway-sequra.php'; |
| 44 |
} else { |
| 45 |
add_action( |
| 46 |
'admin_notices', |
| 47 |
function () { |
| 48 |
echo '<div id="message" class="error"><p>' . esc_html( __( 'Please, remove any previously installed seQura plugins from WooCommerce', 'sequra' ) ) . '</p></div>'; |
| 49 |
} |
| 50 |
); |
| 51 |
} |
| 52 |
|
| 53 |
/** |
| 54 |
* Declare compatibility with WC HPOS. |
| 55 |
* |
| 56 |
* @return void |
| 57 |
*/ |
| 58 |
add_action( |
| 59 |
'before_woocommerce_init', |
| 60 |
function() { |
| 61 |
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { |
| 62 |
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); |
| 63 |
} |
| 64 |
} |
| 65 |
); |
| 66 |
|