Changeset 2052784
- Timestamp:
- 03/18/2019 03:49:23 PM (7 years ago)
- Location:
- digiwallet-for-woocommerce/trunk
- Files:
-
- 10 edited
-
INSTALL.txt (modified) (1 diff)
-
LICENSE (modified) (1 diff)
-
LICENSE.txt (modified) (1 diff)
-
README.md (modified) (2 diffs)
-
changelog.txt (modified) (1 diff)
-
digiwallet.php (modified) (3 diffs)
-
includes/WC_Gateway_DigiWallet.php (modified) (5 diffs)
-
includes/digiwallet.class.php (modified) (1 diff)
-
includes/install.php (modified) (3 diffs)
-
readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
digiwallet-for-woocommerce/trunk/INSTALL.txt
r1972972 r2052784 6 6 7 7 ******************************************************************************** 8 8 9 -- Requirements ---------------------------------------------------------------- 9 10 -
digiwallet-for-woocommerce/trunk/LICENSE
r1972972 r2052784 6 6 Everyone is permitted to copy and distribute verbatim copies 7 7 of this license document, but changing it is not allowed. 8 9 8 10 9 Preamble -
digiwallet-for-woocommerce/trunk/LICENSE.txt
r1972972 r2052784 5 5 Everyone is permitted to copy and distribute verbatim copies 6 6 of this license document, but changing it is not allowed. 7 8 7 9 8 Preamble -
digiwallet-for-woocommerce/trunk/README.md
r1972972 r2052784 1 1 # digiwallet plugin for Woocommerce 2 3 2 4 3 ## Usage … … 21 20 22 21 ## Installation 23 24 22 25 23 ### 1. Set up a Digiwallet account -
digiwallet-for-woocommerce/trunk/changelog.txt
r2013242 r2052784 2 2 5.0.4 21-9-2018 moved to digiwallet, adjusted text info and removed ssl warnings. 3 3 5.0.5 15-1-2019 replace CUrl with WP_Http 4 5.0.6 7-3-2019 fix plugin in case active WP Multisite -
digiwallet-for-woocommerce/trunk/digiwallet.php
r2014121 r2052784 13 13 * Author: DigiWallet.nl 14 14 * Author URI: https://www.digiwallet.nl 15 * Version: 5.0. 515 * Version: 5.0.6 - 7-3-2019 fix plugin in case active WP Multisite 16 16 */ 17 17 define('DIGIWALLET_TABLE_NAME', 'woocommerce_digiwallet'); 18 19 if (! in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {20 return;21 }22 18 23 19 if (! class_exists('DigiWalletInstall')) { … … 27 23 register_activation_hook(__FILE__, array( 28 24 'DigiWalletInstall', 29 'install_db')); 25 'install_db') 26 ); 27 28 /** 29 * WooCommerce fallback notice. 30 * 31 * @return string 32 */ 33 function woocommerce_digiwallet_missing_wc_notice() { 34 echo '<div class="error"><p><strong>DigiWallet for WooCommerce requires WooCommerce to be installed and active</strong></p></div>'; 35 } 30 36 31 37 /** … … 66 72 // so do nothing 67 73 if (! class_exists('WC_Payment_Gateway')) { 74 add_action( 'admin_notices', 'woocommerce_digiwallet_missing_wc_notice' ); 68 75 return; 69 76 } -
digiwallet-for-woocommerce/trunk/includes/WC_Gateway_DigiWallet.php
r1973568 r2052784 217 217 $insert = $wpdb->insert($DigiWalletTable, array( 218 218 'cart_id' => esc_sql($order->get_order_number()), 219 'site_id' => get_current_blog_id(), 219 220 'order_id' => esc_sql($order->get_id()), 220 221 'rtlo' => esc_sql($this->rtlo), … … 391 392 $DigiWalletTable = $this->getDigiWalletTableName(); 392 393 return $wpdb->update($DigiWalletTable, $data, array( 394 'site_id' => get_current_blog_id(), 393 395 'order_id' => esc_sql($order->get_id()))); 394 396 } … … 437 439 global $wpdb; 438 440 439 return $wpdb-> prefix . DIGIWALLET_TABLE_NAME;441 return $wpdb->base_prefix . DIGIWALLET_TABLE_NAME; 440 442 } 441 443 … … 450 452 global $wpdb; 451 453 $DigiWalletTable = $this->getDigiWalletTableName(); 452 $sql = 'SELECT * FROM ' . $DigiWalletTable . " WHERE ` order_id` = '" . esc_sql($orderId) . "' AND `transaction_id` = '" . esc_sql($trxid) . "' ORDER BY `id` DESC";454 $sql = 'SELECT * FROM ' . $DigiWalletTable . " WHERE `site_id` = '" . get_current_blog_id() . "' AND `order_id` = '" . esc_sql($orderId) . "' AND `transaction_id` = '" . esc_sql($trxid) . "' ORDER BY `id` DESC"; 453 455 return $wpdb->get_row($sql, OBJECT); 454 456 } … … 516 518 $requiredColumns = array( 517 519 'id', 520 'site_id', 518 521 'cart_id', 519 522 'order_id', -
digiwallet-for-woocommerce/trunk/includes/digiwallet.class.php
r2013242 r2052784 21 21 // Constants 22 22 23 const APP_ID = 'dw_woocommerce3.x_5.0. 5';23 const APP_ID = 'dw_woocommerce3.x_5.0.6'; 24 24 25 25 const MIN_AMOUNT = 84; -
digiwallet-for-woocommerce/trunk/includes/install.php
r1973568 r2052784 9 9 { 10 10 global $wpdb; 11 $digiwalletTbl = $wpdb-> prefix . DIGIWALLET_TABLE_NAME;11 $digiwalletTbl = $wpdb->base_prefix . DIGIWALLET_TABLE_NAME; 12 12 if(!$wpdb->get_var("SHOW TABLES LIKE '$digiwalletTbl'") == $digiwalletTbl) { 13 13 self::create_digiwallet_db(); 14 14 } 15 self::update_digiwallet_db(); 15 16 } 16 17 … … 23 24 $charset_collate = $wpdb->get_charset_collate(); 24 25 25 $sql = "CREATE TABLE IF NOT EXISTS " . $wpdb-> prefix . DIGIWALLET_TABLE_NAME . " (26 $sql = "CREATE TABLE IF NOT EXISTS " . $wpdb->base_prefix . DIGIWALLET_TABLE_NAME . " ( 26 27 `id` int(11) NOT NULL AUTO_INCREMENT, 27 28 `cart_id` int(11) NOT NULL DEFAULT '0', … … 40 41 dbDelta($sql); 41 42 } 43 44 /** 45 * Update woocommerce_digiwallet table 46 */ 47 public static function update_digiwallet_db() 48 { 49 global $wpdb; 50 $DigiWalletTable = $wpdb->base_prefix . DIGIWALLET_TABLE_NAME; 51 52 if ($wpdb->get_var("SHOW TABLES LIKE '$DigiWalletTable'") == $DigiWalletTable) { 53 $dbColums = $wpdb->get_col('DESC ' . $DigiWalletTable, 0); 54 if(!in_array('site_id', $dbColums)) { 55 $sql_update = ("ALTER TABLE `$DigiWalletTable` ADD `site_id` INT NOT NULL DEFAULT '1' AFTER `id`;"); 56 $wpdb->query($sql_update); 57 } 58 } 59 } 42 60 } -
digiwallet-for-woocommerce/trunk/readme.txt
r2013318 r2052784 3 3 Tags: Digiwallet ,ideal , sofort, Bancontact, Paysafecard , Credit card, Maestro, Visa, paypal, eplugins , targetpay , overboekingen 4 4 Requires at least: 4.9.8 5 Tested up to: 5. 0.55 Tested up to: 5.1 6 6 Requires PHP: 5.6 7 Stable tag: 5.0.57 Stable tag: Master 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 29 29 * Bancontact 30 30 * Sofort 31 * PaySafeCard32 31 * Afterpay 33 32 * Credit Card … … 44 43 45 44 ### 1. Set up a Digiwallet account 46 Before you can use the plugin, please sign up for a Digiwallet account on <a href="https://www.digiwallet.nl">Digiwallet.nl</a>45 Before you can use the plugin, please sign up for a Digiwallet account on www.Digiwallet.nl 47 46 48 47 Note that the plugin can be used in a live environment only after it has been completed with your details and … … 55 54 ### 3. Setting up 56 55 57 Check out the specific installation instructions and tips on <a href="https://www.e-plugins.nl">e-plugins.nl</a>56 Check out the specific installation instructions and tips on https://www.e-plugins.nl/ 58 57 59 58 == Frequently Asked Questions == 60 59 61 Please see the FAQ on <a href="https://www.e-plugins.nl">e-plugins.nl</a>60 Please see the FAQ on https://www.e-plugins.nl/ 62 61 63 62 == Screenshots == … … 70 69 = 5.0.4 = 71 70 Initial release , complete renewed from targetpay 72 = 5.0.5 =73 Replaced curl with wp_http74 75 71 76 72 == Upgrade Notice ==
Note: See TracChangeset
for help on using the changeset viewer.