Changeset 2415212
- Timestamp:
- 11/09/2020 02:04:55 PM (5 years ago)
- Location:
- k2-woo-custom-payment-gateway
- Files:
-
- 3 added
- 2 edited
-
tags/1.1 (added)
-
tags/1.1/K2_Custom_Payment_Gateway.php (added)
-
tags/1.1/Readme.txt (added)
-
trunk/K2_Custom_Payment_Gateway.php (modified) (7 diffs)
-
trunk/Readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
k2-woo-custom-payment-gateway/trunk/K2_Custom_Payment_Gateway.php
r2368902 r2415212 1 1 <?php 2 /* 2 /** 3 3 * Plugin Name: K2 Custom Payment Gateway for WooCommerce 4 * @package K2Blocks 4 5 * Plugin URI: https://pookidevs.com 5 6 * Description: Add Custom Payment Gateway on Woocommerce Checkout with custom fields. 6 7 * Author: PookiDevs 7 8 * Author URI: http://pookidevs.com 8 * Version: 1. 0.09 * Version: 1.1 9 10 * 10 11 */ … … 23 24 } 24 25 26 if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { 27 } 28 29 else{ 30 add_action( 'admin_notices', 'admin_notice_missing_main_plugin' ); 31 return; 32 } 33 34 function admin_notice_missing_main_plugin() { 35 deactivate_plugins( plugin_basename(__FILE__) ); 36 unset($_GET['activate']); 37 ?> 38 <div class="notice notice-error"> 39 <p><strong>Plugin deactivated. WooCommerce not installed/activated</strong>.</p> 40 </div> 41 <?php 42 } 25 43 26 44 // Define Custom Gateway Class & Implement Login … … 39 57 $this->domain = 'custom_payment'; 40 58 41 $this->id = ' k2woocustompaymentgateway';59 $this->id = 'K2WooCustomPaymentGateway'; 42 60 $this->icon = apply_filters('woocommerce_custom_gateway_icon', ''); 43 61 $this->has_fields = false; … … 55 73 56 74 // Actions 57 75 58 76 add_action( 'wp_enqueue_scripts', array( $this, 'payment_style_scripts' ) ); 59 77 add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) ); 60 78 add_action( 'woocommerce_thankyou_' . $this->id, array( $this, 'thankyou_page' ) ); 61 62 79 80 63 81 64 82 65 83 // Customer Emails 66 84 add_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 3 ); 67 68 69 70 85 86 87 88 71 89 add_action( 'wp_enqueue_scripts', array( $this, 'payment_scripts' ) ); 72 90 … … 126 144 127 145 } 128 146 129 147 130 148 /** … … 155 173 ); 156 174 } 157 158 175 176 159 177 } 160 178 } … … 166 184 global $wpdb; 167 185 168 if($_POST['payment_method'] != ' k2woocustompaymentgateway')186 if($_POST['payment_method'] != 'K2WooCustomPaymentGateway') 169 187 return; 170 188 -
k2-woo-custom-payment-gateway/trunk/Readme.txt
r2368884 r2415212 1 1 === K2 Custom Payment Gateway for WooCommerce === 2 Contributors: syedharis632, shahrukhx04, saadhamid2 Contributors: syedharis632, shahrukhx04, hmumtaz1, saadhamid 3 3 Tags: Wordpress, Woocommerce, Essentials 4 4 Requires at least: 5.2 5 Tested up to: 5.5 5 Tested up to: 5.5.1 6 6 Requires PHP: 5.6 7 Stable tag: 1. 0.07 Stable tag: 1.1 8 8 License: GPL2+ 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.txt … … 64 64 = 1.0.0 = 65 65 Initial release 66 66 = 1.1 = 67 Bug fixes 67 68 68 69 == Development ==
Note: See TracChangeset
for help on using the changeset viewer.