Changeset 3489607
- Timestamp:
- 03/24/2026 04:24:31 AM (4 days ago)
- Location:
- smjrifle-qr-payments
- Files:
-
- 6 edited
- 7 copied
-
tags/1.0.1 (copied) (copied from smjrifle-qr-payments/trunk)
-
tags/1.0.1/admin (copied) (copied from smjrifle-qr-payments/trunk/admin)
-
tags/1.0.1/admin/class-smjrifle-qr-payments-admin.php (modified) (2 diffs)
-
tags/1.0.1/assets (copied) (copied from smjrifle-qr-payments/trunk/assets)
-
tags/1.0.1/includes (copied) (copied from smjrifle-qr-payments/trunk/includes)
-
tags/1.0.1/includes/class-smjrifle-qr-payments.php (modified) (2 diffs)
-
tags/1.0.1/public (copied) (copied from smjrifle-qr-payments/trunk/public)
-
tags/1.0.1/readme.txt (copied) (copied from smjrifle-qr-payments/trunk/readme.txt) (1 diff)
-
tags/1.0.1/smjrifle-qr-payments.php (copied) (copied from smjrifle-qr-payments/trunk/smjrifle-qr-payments.php) (3 diffs)
-
trunk/admin/class-smjrifle-qr-payments-admin.php (modified) (2 diffs)
-
trunk/includes/class-smjrifle-qr-payments.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/smjrifle-qr-payments.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
smjrifle-qr-payments/tags/1.0.1/admin/class-smjrifle-qr-payments-admin.php
r3472048 r3489607 18 18 add_action('add_meta_boxes', array($this, 'add_meta_box'), 10, 3); 19 19 add_action('woocommerce_email_order_meta', array($this, 'receipt_email_meta'), 10, 3); 20 add_action('admin_notices', array($this, 'checkout_block_warning')); 21 } 22 23 public function checkout_block_warning() 24 { 25 if (!function_exists('wc_get_page_id') || !function_exists('has_block')) { 26 return; 27 } 28 29 $checkout_page_id = wc_get_page_id('checkout'); 30 if ($checkout_page_id && has_block('woocommerce/checkout', $checkout_page_id)) { 31 $options = get_option('woocommerce_smjrifle_qr_payments_settings'); 32 if (isset($options['enabled']) && $options['enabled'] === 'yes') { 33 echo '<div class="notice notice-warning is-dismissible"><p><strong>' . esc_html__('Smjrifle QR Payments:', 'smjrifle-qr-payments') . '</strong> ' . esc_html__('Your checkout page is currently using the WooCommerce Checkout Block. This custom payment gateway relies on the classic WooCommerce checkout shortcode. Please edit your Checkout page, remove the block, and insert the [woocommerce_checkout] shortcode for the payment method to appear.', 'smjrifle-qr-payments') . '</p></div>'; 34 } 35 } 20 36 } 21 37 … … 62 78 public function add_meta_box() 63 79 { 80 if (!function_exists('wc_get_page_screen_id')) return; 81 $screen = wc_get_page_screen_id('shop_order'); 82 83 if (!$screen) { 84 $screen = 'shop_order'; 85 } 64 86 add_meta_box( 65 87 'smjrifle-qr-payments-meta-box', 66 88 esc_html__('Payment Receipt', 'smjrifle-qr-payments'), 67 89 array($this, 'meta_box_callback'), 68 wc_get_page_screen_id('shop-order'),90 $screen, 69 91 'side', 70 92 'default' -
smjrifle-qr-payments/tags/1.0.1/includes/class-smjrifle-qr-payments.php
r3472048 r3489607 15 15 { 16 16 $this->plugin_name = 'smjrifle-qr-payments'; 17 $this->version = '2.0.0';17 $this->version = defined('SMJ_QR_PAYMENTS_VERSION') ? SMJ_QR_PAYMENTS_VERSION : '1.0.0'; 18 18 19 19 $this->load_dependencies(); … … 51 51 { 52 52 $this->define_public_hooks(); 53 add_action(' plugins_loaded', array($this, 'init_gateway'));53 add_action('woocommerce_init', [$this, 'init_gateway']); 54 54 } 55 55 -
smjrifle-qr-payments/tags/1.0.1/readme.txt
r3472048 r3489607 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 07 Stable tag: 1.0.1 8 8 License: GPL v2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
smjrifle-qr-payments/tags/1.0.1/smjrifle-qr-payments.php
r3472048 r3489607 4 4 * Plugin Name: Smjrifle QR Payments 5 5 * Description: A modern, secure, and class-based WooCommerce payment method for QR code payments. 6 * Version: 1.0. 06 * Version: 1.0.1 7 7 * Requires at least: 5.6 8 8 * Requires PHP: 7.4 … … 12 12 * License: GPL-2.0-or-later 13 13 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 14 * Requires Plugins: woocommerce 14 15 */ 15 16 … … 19 20 } 20 21 21 /** 22 * The core plugin class that is used to define internationalization, 23 * admin-specific hooks, and public-facing site hooks. 24 */ 25 require plugin_dir_path(__FILE__) . 'includes/class-smjrifle-qr-payments.php'; 22 define('SMJ_QR_PAYMENTS_VERSION', '1.0.1'); 26 23 27 /** 28 * Begins execution of the plugin. 29 */ 30 function smjrifle_qr_payments_run() 24 add_action('plugins_loaded', 'smjrifle_qr_payments_init', 20); 25 26 function smjrifle_qr_payments_init() 31 27 { 28 if (!class_exists('WooCommerce')) { 29 30 add_action('admin_notices', 'smjrifle_qr_missing_wc_notice'); 31 32 add_action('admin_init', function () { 33 deactivate_plugins(plugin_basename(__FILE__)); 34 }); 35 36 return; 37 } 38 39 require_once plugin_dir_path(__FILE__) . 'includes/class-smjrifle-qr-payments.php'; 40 32 41 $plugin = new Smjrifle_QR_Payments(); 33 42 $plugin->run(); 34 43 } 35 smjrifle_qr_payments_run(); 44 45 function smjrifle_qr_missing_wc_notice() 46 { 47 ?> 48 <div class="notice notice-error"> 49 <p> 50 <strong>Smjrifle QR Payments:</strong> 51 WooCommerce must be installed and active. 52 </p> 53 </div> 54 <?php 55 } -
smjrifle-qr-payments/trunk/admin/class-smjrifle-qr-payments-admin.php
r3472048 r3489607 18 18 add_action('add_meta_boxes', array($this, 'add_meta_box'), 10, 3); 19 19 add_action('woocommerce_email_order_meta', array($this, 'receipt_email_meta'), 10, 3); 20 add_action('admin_notices', array($this, 'checkout_block_warning')); 21 } 22 23 public function checkout_block_warning() 24 { 25 if (!function_exists('wc_get_page_id') || !function_exists('has_block')) { 26 return; 27 } 28 29 $checkout_page_id = wc_get_page_id('checkout'); 30 if ($checkout_page_id && has_block('woocommerce/checkout', $checkout_page_id)) { 31 $options = get_option('woocommerce_smjrifle_qr_payments_settings'); 32 if (isset($options['enabled']) && $options['enabled'] === 'yes') { 33 echo '<div class="notice notice-warning is-dismissible"><p><strong>' . esc_html__('Smjrifle QR Payments:', 'smjrifle-qr-payments') . '</strong> ' . esc_html__('Your checkout page is currently using the WooCommerce Checkout Block. This custom payment gateway relies on the classic WooCommerce checkout shortcode. Please edit your Checkout page, remove the block, and insert the [woocommerce_checkout] shortcode for the payment method to appear.', 'smjrifle-qr-payments') . '</p></div>'; 34 } 35 } 20 36 } 21 37 … … 62 78 public function add_meta_box() 63 79 { 80 if (!function_exists('wc_get_page_screen_id')) return; 81 $screen = wc_get_page_screen_id('shop_order'); 82 83 if (!$screen) { 84 $screen = 'shop_order'; 85 } 64 86 add_meta_box( 65 87 'smjrifle-qr-payments-meta-box', 66 88 esc_html__('Payment Receipt', 'smjrifle-qr-payments'), 67 89 array($this, 'meta_box_callback'), 68 wc_get_page_screen_id('shop-order'),90 $screen, 69 91 'side', 70 92 'default' -
smjrifle-qr-payments/trunk/includes/class-smjrifle-qr-payments.php
r3472048 r3489607 15 15 { 16 16 $this->plugin_name = 'smjrifle-qr-payments'; 17 $this->version = '2.0.0';17 $this->version = defined('SMJ_QR_PAYMENTS_VERSION') ? SMJ_QR_PAYMENTS_VERSION : '1.0.0'; 18 18 19 19 $this->load_dependencies(); … … 51 51 { 52 52 $this->define_public_hooks(); 53 add_action(' plugins_loaded', array($this, 'init_gateway'));53 add_action('woocommerce_init', [$this, 'init_gateway']); 54 54 } 55 55 -
smjrifle-qr-payments/trunk/readme.txt
r3472048 r3489607 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 07 Stable tag: 1.0.1 8 8 License: GPL v2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
smjrifle-qr-payments/trunk/smjrifle-qr-payments.php
r3472048 r3489607 4 4 * Plugin Name: Smjrifle QR Payments 5 5 * Description: A modern, secure, and class-based WooCommerce payment method for QR code payments. 6 * Version: 1.0. 06 * Version: 1.0.1 7 7 * Requires at least: 5.6 8 8 * Requires PHP: 7.4 … … 12 12 * License: GPL-2.0-or-later 13 13 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 14 * Requires Plugins: woocommerce 14 15 */ 15 16 … … 19 20 } 20 21 21 /** 22 * The core plugin class that is used to define internationalization, 23 * admin-specific hooks, and public-facing site hooks. 24 */ 25 require plugin_dir_path(__FILE__) . 'includes/class-smjrifle-qr-payments.php'; 22 define('SMJ_QR_PAYMENTS_VERSION', '1.0.1'); 26 23 27 /** 28 * Begins execution of the plugin. 29 */ 30 function smjrifle_qr_payments_run() 24 add_action('plugins_loaded', 'smjrifle_qr_payments_init', 20); 25 26 function smjrifle_qr_payments_init() 31 27 { 28 if (!class_exists('WooCommerce')) { 29 30 add_action('admin_notices', 'smjrifle_qr_missing_wc_notice'); 31 32 add_action('admin_init', function () { 33 deactivate_plugins(plugin_basename(__FILE__)); 34 }); 35 36 return; 37 } 38 39 require_once plugin_dir_path(__FILE__) . 'includes/class-smjrifle-qr-payments.php'; 40 32 41 $plugin = new Smjrifle_QR_Payments(); 33 42 $plugin->run(); 34 43 } 35 smjrifle_qr_payments_run(); 44 45 function smjrifle_qr_missing_wc_notice() 46 { 47 ?> 48 <div class="notice notice-error"> 49 <p> 50 <strong>Smjrifle QR Payments:</strong> 51 WooCommerce must be installed and active. 52 </p> 53 </div> 54 <?php 55 }
Note: See TracChangeset
for help on using the changeset viewer.