Changeset 2252529
- Timestamp:
- 03/01/2020 09:06:06 AM (6 years ago)
- Location:
- wc-robokassa/trunk
- Files:
-
- 1 added
- 1 deleted
- 5 edited
-
gatework (deleted)
-
includes/class-wc-robokassa-logger.php (added)
-
includes/class-wc-robokassa-method.php (modified) (3 diffs)
-
includes/class-wc-robokassa.php (modified) (7 diffs)
-
includes/functions-wc-robokassa.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
wc-robokassa.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wc-robokassa/trunk/includes/class-wc-robokassa-method.php
r2250976 r2252529 1475 1475 public function process_payment($order_id) 1476 1476 { 1477 /**1478 * Get order object1479 */1480 1477 $order = wc_get_order($order_id); 1481 1482 /** 1483 * Order fail 1484 */ 1478 1485 1479 if($order === false) 1486 1480 { … … 1495 1489 1496 1490 // hook 1497 do_action('wc_robokassa_process_payment_start', $order_id, $order); 1498 1499 /** 1500 * Add order note 1501 */ 1491 do_action('wc_robokassa_before_process_payment', $order_id, $order); 1492 1493 WC_Robokassa()->get_logger()->debug('process_payment: order', $order); 1494 1502 1495 if(method_exists($order, 'add_order_note')) 1503 1496 { … … 1505 1498 } 1506 1499 1507 /**1508 * Page skipping enabled1509 */1510 1500 if($this->get_page_skipping() === 'yes') 1511 1501 { -
wc-robokassa/trunk/includes/class-wc-robokassa.php
r2251174 r2252529 19 19 * Logger 20 20 * 21 * @var WC_ Gatework_Logger21 * @var WC_Robokassa_Logger 22 22 */ 23 23 public $logger = false; … … 275 275 public function load_currency() 276 276 { 277 $wc_currency = gatework_get_wc_currency();277 $wc_currency = wc_robokassa_get_wc_currency(); 278 278 279 279 /** … … 301 301 public function load_wc_version() 302 302 { 303 $wc_version = gatework_get_wc_version();303 $wc_version = wc_robokassa_get_wc_version(); 304 304 305 305 // log … … 376 376 try 377 377 { 378 $logger = new WC_ Gatework_Logger();378 $logger = new WC_Robokassa_Logger(); 379 379 } 380 380 catch(Exception $e) … … 416 416 * Get logger 417 417 * 418 * @return WC_ Gatework_Logger|null418 * @return WC_Robokassa_Logger|null 419 419 */ 420 420 public function get_logger() … … 458 458 public function wc_robokassa_admin_notices() 459 459 { 460 $section = ''; 461 if(isset($_GET['section'])) 462 { 463 $section = $_GET['section']; 464 } 465 460 466 $settings_version = get_option('wc_robokassa_last_settings_update_version'); 461 467 … … 463 469 * Global notice: Require update settings 464 470 */ 465 if(get_option('wc_robokassa_last_settings_update_version') !== false && $settings_version < WC_ROBOKASSA_VERSION && $_GET['section'] !== 'robokassa') 471 if(get_option('wc_robokassa_last_settings_update_version') !== false 472 && $settings_version < WC_ROBOKASSA_VERSION 473 && $section !== 'robokassa') 466 474 { 467 475 } -
wc-robokassa/trunk/includes/functions-wc-robokassa.php
r2251174 r2252529 15 15 return false; 16 16 } 17 18 /** 19 * Get current version WooCommerce 20 * 21 * @since 3.0.2 22 */ 23 function wc_robokassa_get_wc_version() 24 { 25 if(function_exists('is_woocommerce_active') && is_woocommerce_active()) 26 { 27 global $woocommerce; 28 29 if(isset($woocommerce->version)) 30 { 31 return $woocommerce->version; 32 } 33 } 34 35 if(!function_exists('get_plugins')) 36 { 37 require_once(ABSPATH . 'wp-admin/includes/plugin.php'); 38 } 39 40 $plugin_folder = get_plugins('/woocommerce'); 41 $plugin_file = 'woocommerce.php'; 42 43 if(isset($plugin_folder[$plugin_file]['Version'])) 44 { 45 return $plugin_folder[$plugin_file]['Version']; 46 } 47 48 return null; 49 } 50 51 /** 52 * Get WooCommerce currency code 53 * 54 * @since 3.0.2 55 * 56 * @return string 57 */ 58 function wc_robokassa_get_wc_currency() 59 { 60 return get_woocommerce_currency(); 61 } -
wc-robokassa/trunk/readme.txt
r2251174 r2252529 46 46 47 47 == Changelog == 48 49 = 3.0.2 = 50 * Remove gatework 48 51 49 52 = 3.0.1 = -
wc-robokassa/trunk/wc-robokassa.php
r2251174 r2252529 4 4 * Description: Integration Robokassa in WooCommerce as payment gateway plugin. 5 5 * Plugin URI: https://mofsy.ru/projects/wc-robokassa 6 * Version: 3.0. 16 * Version: 3.0.2 7 7 * WC requires at least: 3.0 8 8 * WC tested up to: 3.9 … … 19 19 defined('ABSPATH') || exit; 20 20 21 if( defined('WC_ROBOKASSA_VERSION') !== true)21 if(class_exists('WC_Robokassa') !== true) 22 22 { 23 23 $plugin_data = get_file_data(__FILE__, array('Version' => 'Version')); 24 24 define('WC_ROBOKASSA_VERSION', $plugin_data['Version']); 25 }26 25 27 if(defined('WC_ROBOKASSA_URL') !== true)28 {29 26 define('WC_ROBOKASSA_URL', plugin_dir_url(__FILE__)); 30 } 27 define('WC_ROBOKASSA_PLUGIN_DIR', plugin_dir_path(__FILE__)); 28 define('WC_ROBOKASSA_PLUGIN_NAME', plugin_basename(__FILE__)); 31 29 32 if(defined('WC_ROBOKASSA_PLUGIN_DIR') !== true)33 {34 define('WC_ROBOKASSA_PLUGIN_DIR', plugin_dir_path(__FILE__));35 }36 37 if(defined('WC_ROBOKASSA_PLUGIN_NAME') !== true)38 {39 define('WC_ROBOKASSA_PLUGIN_NAME', plugin_basename(__FILE__));40 }41 42 /**43 * GateWork44 */45 include_once __DIR__ . '/gatework/init.php';46 47 /**48 * Gateway class49 */50 if(class_exists('WC_Robokassa') !== true)51 {52 30 include_once __DIR__ . '/includes/functions-wc-robokassa.php'; 31 include_once __DIR__ . '/includes/class-wc-robokassa-logger.php'; 53 32 include_once __DIR__ . '/includes/class-wc-robokassa.php'; 54 33 } 55 34 56 /**57 * Run58 */59 35 add_action('plugins_loaded', 'WC_Robokassa', 5);
Note: See TracChangeset
for help on using the changeset viewer.