Changeset 2349123
- Timestamp:
- 07/30/2020 01:44:03 PM (6 years ago)
- Location:
- easify-server-woocommerce/trunk
- Files:
-
- 5 edited
-
easify.php (modified) (2 diffs)
-
includes/class-easify-wc-easify-options.php (modified) (4 diffs)
-
includes/class-easify-wc-plugin-settings-page.php (modified) (2 diffs)
-
includes/class-easify-wc-send-order-to-easify.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easify-server-woocommerce/trunk/easify.php
r2317370 r2349123 5 5 * Plugin URI: http://www.easify.co.uk/wordpress/ 6 6 * Description: Connects Easify Business Management, EPOS (Electronic Point of Sale) and invoicing software to your WooCommerce enabled WordPress website. Allowing you to keep your online and offline shop's orders and stock control synchronised. 7 * Version: 4.2 17 * Version: 4.22 8 8 * License: GPL2 9 9 * License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 12 12 * Requires at least: 4.0 13 13 * Tested up to: 5.4 14 * WC tested up to: 4. 114 * WC tested up to: 4.3 15 15 */ 16 16 -
easify-server-woocommerce/trunk/includes/class-easify-wc-easify-options.php
r2289263 r2349123 23 23 * 24 24 * @class Easify_WC_Easify_Options 25 * @version 4. 1925 * @version 4.22 26 26 * @package easify-woocommerce-connector 27 27 * @author Easify … … 338 338 * @return boolean Returns true if the payment method is enabled. 339 339 */ 340 public function is_payment_method_enabled($payment_method) { 340 public function is_payment_method_enabled($payment_method) { 341 341 if (!isset($this->payment_options['easify_payment_mapping'][$payment_method]['raise'])) { 342 Easify_Logging::Log('Easify_WC_Easify_Options::is_payment_method_enabled() payment mapping not set for: ' . $payment_method); 342 343 return false; 343 344 } 344 345 345 346 if ($this->payment_options['easify_payment_mapping'][$payment_method]['raise'] == 'true') { 347 Easify_Logging::Log('Easify_WC_Easify_Options::is_payment_method_enabled() payment method enabled: ' . $payment_method); 346 348 return true; 347 349 } 348 350 351 Easify_Logging::Log('Easify_WC_Easify_Options::is_payment_method_enabled() payment method not enabled: ' . $payment_method); 349 352 return false; 350 353 } … … 359 362 */ 360 363 public function get_payment_mapping_by_payment_method_name($payment_method_name) { 364 Easify_Logging::Log('Easify_WC_Easify_Options::get_payment_mapping_by_payment_method_name() ' . $payment_method_name); 365 361 366 if (isset($this->payment_options['easify_payment_mapping'][$payment_method_name])) { 367 Easify_Logging::Log('Easify_WC_Easify_Options::get_payment_mapping_by_payment_method_name() ' . $payment_method_name . ' mapping set'); 362 368 return $this->payment_options['easify_payment_mapping'][$payment_method_name]; 363 369 } 364 370 371 Easify_Logging::Log('Easify_WC_Easify_Options::get_payment_mapping_by_payment_method_name() ' . $payment_method_name . ' mapping not set'); 365 372 return NULL; 366 373 } … … 374 381 public function get_payment_comment_by_payment_method_name($payment_method_name) { 375 382 if (!isset($this->payment_options['easify_payment_comment'])) { 376 return ' ';377 } 378 379 return $this->payment_options['easify_payment_comment'] ;383 return 'Paid via ' . $payment_method_name; 384 } 385 386 return $this->payment_options['easify_payment_comment'] . ' (' . $payment_method_name . ')'; 380 387 } 381 388 -
easify-server-woocommerce/trunk/includes/class-easify-wc-plugin-settings-page.php
r2289263 r2349123 30 30 * 31 31 * @class Easify_WC__Plugin_Settings_Page 32 * @version 4. 1932 * @version 4.22 33 33 * @package easify-woocommerce-connector 34 34 * @author Easify … … 1925 1925 <p>When an order is placed via WooCommerce, it will be sent to your Easify Server and a payment record will be created 1926 1926 in Easify.</p> 1927 <p>Here you can enter the comment that will be added to the payment record in Easify.</p> 1927 <p>Here you can enter the comment that will be added to the payment record in Easify.</p> 1928 <p>The payment method used by the customer will be appended to this value so if the customer pays using stripe 1929 the comment on the payment record in Easify will be 'Payment via website (stripe)'.</p> 1928 1930 <?= $this->tooltip_click_here_link('payments-comment') ?> 1929 1931 </div> -
easify-server-woocommerce/trunk/includes/class-easify-wc-send-order-to-easify.php
r2315763 r2349123 31 31 * 32 32 * @class Easify_WC_Send_Order_To_Easify 33 * @version 4.2 033 * @version 4.22 34 34 * @package easify-woocommerce-connector 35 35 * @author Easify … … 377 377 378 378 private function do_payment() { 379 // If this payment method has not been enabled in Easify Options, do nothing 380 if (!$this->easify_options->is_payment_method_enabled($this->woocommerce_order->payment_method)) { 381 return; 382 } 383 379 Easify_Logging::Log('Easify_WC_Send_Order_To_Easify.do_payment() Payment Method: ' . $this->woocommerce_order->payment_method); 380 384 381 // Get the payment mapping details from the Easify options... 385 382 $payment_mapping = $this->easify_options->get_payment_mapping_by_payment_method_name($this->woocommerce_order->payment_method); 386 383 387 384 if ($payment_mapping == NULL) { 388 385 // Use default payment mapping if no matching mapping found - i.e. 389 386 // if WooCommerce has a payment method that we don't support. 390 $payment_mapping = $this->easify_options->get_payment_mapping_by_payment_method_name('Default'); 387 Easify_Logging::Log('Easify_WC_Send_Order_To_Easify.do_payment() - unknown payment method, using default.'); 388 389 $payment_mapping = $this->easify_options->get_payment_mapping_by_payment_method_name('default'); 390 391 // If this payment method has not been enabled in Easify Options, do nothing 392 if (!$this->easify_options->is_payment_method_enabled('default')) { 393 Easify_Logging::Log('Easify_WC_Send_Order_To_Easify.do_payment() - default payment method not enabled, ignoring.'); 394 return; 395 } 396 } 397 else { 398 // We have a payment mapping use it and make sure it is enabled... 399 // If this payment method has not been enabled in Easify Options, do nothing 400 if (!$this->easify_options->is_payment_method_enabled($this->woocommerce_order->payment_method)) { 401 Easify_Logging::Log('Easify_WC_Send_Order_To_Easify.do_payment() - payment method not enabled, ignoring.'); 402 return; 403 } 391 404 } 392 405 -
easify-server-woocommerce/trunk/readme.txt
r2317370 r2349123 5 5 Requires at least: 4.0 6 6 Tested up to: 5.4 7 Stable tag: 4.2 17 Stable tag: 4.22 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 WC tested up to: 4. 110 WC tested up to: 4.3 11 11 12 12 Connects Easify V4.x Small Business Software to your WooCommerce online shop, … … 101 101 102 102 == Changelog == 103 = 4.22 = 104 * Fixed issue with default payment method not being sent to Easify when an order 105 is placed with a non standard payment method. 103 106 = 4.21 = 104 107 * Fixed issue with backorders not being allowed when stock level reaches zero. … … 169 172 170 173 == Upgrade Notice == 171 = 4.21 = 172 * Fixed issue with backorders not being allowed when stock level reaches zero. 174 = 4.22 = 175 * Fixed issue with default payment method not being sent to Easify when an order 176 is placed with a non standard payment method.
Note: See TracChangeset
for help on using the changeset viewer.