Changeset 2968699
- Timestamp:
- 09/19/2023 11:26:29 AM (3 years ago)
- Location:
- woo-masterway/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
woocommerce-masterway.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-masterway/trunk/readme.txt
r2968676 r2968699 28 28 29 29 == Changelog == 30 31 = 1.2.1 = 32 * Fix: Compatibility with PHP version 8.2 30 33 31 34 = 1.2 = -
woo-masterway/trunk/woocommerce-masterway.php
r2968676 r2968699 4 4 Plugin URI: http://woothemes.com/woocommerce 5 5 Description: Allows you to invoice your clients using Masterway 6 Version: 1.2 6 Version: 1.2.1 7 7 Author: Masterway 8 8 Author URI: http://masterway.net … … 42 42 43 43 class woocommerce_masterway { 44 45 public $APIKey; 46 public $APISecret; 47 public $Serie; 48 public $CompanyCode; 49 44 50 function __construct() { 45 51 require_once('MasterwayRequest-PHP-API/lib/MasterwayRequest.php'); … … 994 1000 } 995 1001 996 //Add field to order admin panel 997 function wc_ie_nif_admin($order){ 998 if (@is_array($order->order_custom_fields['_billing_country'])) { 999 //Old WooCommerce versions 1000 if(@in_array('PT', $order->order_custom_fields['_billing_country']) ) { 1001 echo "<p><strong>".__('NIF / NIPC', 'wc_masterway').":</strong> " . $order->order_custom_fields['_billing_nif'][0] . "</p>"; 1002 } 1003 } else { 1004 //New WooCommerce versions 1005 if ($order->billing_country=='PT') { 1006 $order_custom_fields=get_post_custom($order->ID); 1007 echo "<p><strong>".__('NIF / NIPC', 'wc_masterway').":</strong> " . $order_custom_fields['_billing_nif'][0] . "</p>"; 1008 } 1009 } 1010 } 1002 // Add field to order admin panel 1003 function wc_ie_nif_admin($order){ 1004 if (isset($order->order_custom_fields['_billing_country'])) { 1005 if (is_array($order->order_custom_fields['_billing_country'])) { 1006 // Old WooCommerce versions 1007 if (in_array('PT', $order->order_custom_fields['_billing_country'])) { 1008 echo "<p><strong>".__('NIF / NIPC', 'wc_masterway').":</strong> " . $order->order_custom_fields['_billing_nif'][0] . "</p>"; 1009 } 1010 } else { 1011 // New WooCommerce versions 1012 if ($order->order_custom_fields['_billing_country'] == 'PT') { 1013 $order_custom_fields = get_post_custom($order->ID); 1014 echo "<p><strong>".__('NIF / NIPC', 'wc_masterway').":</strong> " . $order_custom_fields['_billing_nif'][0] . "</p>"; 1015 } 1016 } 1017 } else { 1018 // Handle the case where '_billing_country' is not set in the custom fields 1019 } 1020 } 1021 1011 1022 1012 1023 function wc_ie_nif_validation() {
Note: See TracChangeset
for help on using the changeset viewer.