Changeset 3454681
- Timestamp:
- 02/05/2026 01:55:25 PM (8 weeks ago)
- Location:
- wintouch-cloud
- Files:
-
- 11 edited
- 14 copied
-
tags/0.0.8 (copied) (copied from wintouch-cloud/trunk)
-
tags/0.0.8/README.md (copied) (copied from wintouch-cloud/trunk/README.md) (1 diff)
-
tags/0.0.8/assets/css/style.css (copied) (copied from wintouch-cloud/trunk/assets/css/style.css)
-
tags/0.0.8/readme.txt (copied) (copied from wintouch-cloud/trunk/readme.txt) (1 diff)
-
tags/0.0.8/src/Api.php (copied) (copied from wintouch-cloud/trunk/src/Api.php) (3 diffs)
-
tags/0.0.8/src/Authentication.php (copied) (copied from wintouch-cloud/trunk/src/Authentication.php) (1 diff)
-
tags/0.0.8/src/Menu.php (copied) (copied from wintouch-cloud/trunk/src/Menu.php)
-
tags/0.0.8/src/Order.php (copied) (copied from wintouch-cloud/trunk/src/Order.php)
-
tags/0.0.8/src/Stock.php (copied) (copied from wintouch-cloud/trunk/src/Stock.php)
-
tags/0.0.8/views/Account.php (copied) (copied from wintouch-cloud/trunk/views/Account.php) (2 diffs)
-
tags/0.0.8/views/Authentication.php (copied) (copied from wintouch-cloud/trunk/views/Authentication.php)
-
tags/0.0.8/views/Enterprises.php (modified) (1 diff)
-
tags/0.0.8/views/General.php (copied) (copied from wintouch-cloud/trunk/views/General.php) (1 diff)
-
tags/0.0.8/views/Orders.php (modified) (1 diff)
-
tags/0.0.8/views/Settings.php (copied) (copied from wintouch-cloud/trunk/views/Settings.php)
-
tags/0.0.8/wintouch-cloud.php (copied) (copied from wintouch-cloud/trunk/wintouch-cloud.php) (1 diff)
-
trunk/README.md (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/src/Api.php (modified) (3 diffs)
-
trunk/src/Authentication.php (modified) (1 diff)
-
trunk/views/Account.php (modified) (2 diffs)
-
trunk/views/Enterprises.php (modified) (1 diff)
-
trunk/views/General.php (modified) (1 diff)
-
trunk/views/Orders.php (modified) (1 diff)
-
trunk/wintouch-cloud.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wintouch-cloud/tags/0.0.8/README.md
r3450548 r3454681 8 8 **Requires at least:** 5.0 9 9 **Tested up to:** 6.9 10 **Stable tag:** 0.0. 710 **Stable tag:** 0.0.8 11 11 **Requires PHP:** 7.2 12 12 **License:** GPLv2 or later -
wintouch-cloud/tags/0.0.8/readme.txt
r3450548 r3454681 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 0.0. 76 Stable tag: 0.0.8 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later -
wintouch-cloud/tags/0.0.8/src/Api.php
r3447688 r3454681 40 40 $data = json_encode([ 41 41 "store" => $storeurl, 42 "type" => "woocommerce" 42 "type" => "woocommerce", 43 "vatroundatdocument" => get_option("woocommerce_tax_round_at_subtotal") === 'yes' 43 44 ]); 44 45 … … 47 48 $body = wp_remote_retrieve_body($response); 48 49 49 return json_decode($body, true); 50 $parsed = json_decode($body, true); 51 52 if (!isset($parsed['errors'])) { 53 return $parsed; 54 } 55 56 throw new ApiException(esc_html($parsed['errors'][0]['message'])); 50 57 } 51 58 … … 75 82 76 83 public function GetEnterprises() { 77 $response = $this->Get('enterprises ');84 $response = $this->Get('enterprises?IsActive=eq=true'); 78 85 $body = wp_remote_retrieve_body($response); 79 86 $parsed = json_decode($body, true); -
wintouch-cloud/tags/0.0.8/src/Authentication.php
r3448855 r3454681 56 56 $url = wp_parse_url(get_site_url(), PHP_URL_HOST); 57 57 $storeurl = preg_replace('/^www\./', '', $url); 58 (new Api())->CreateIntegration($storeurl);59 58 60 update_option('wintouch_shopurl', $storeurl, false); 61 update_option('wintouch_setting_orderstate', null, false); 62 delete_option('wintouch_setting_syncstock'); 63 delete_option('wintouch_lastsync'); 59 try { 60 $response = (new Api())->CreateIntegration($storeurl); 64 61 65 return true; 62 update_option('wintouch_shopurl', $storeurl, false); 63 update_option('wintouch_setting_orderstate', null, false); 64 65 delete_option('wintouch_setting_syncstock'); 66 delete_option('wintouch_lastsync'); 67 68 return true; 69 } catch (ApiException $ex) { 70 delete_option('wintouch_enterpriseid'); 71 delete_option('wintouch_apikey'); 72 add_settings_error('wintouch', 'wt', $ex->getMessage(), 'error'); 73 } 66 74 } 67 75 -
wintouch-cloud/tags/0.0.8/views/Account.php
r3450548 r3454681 18 18 <div class="card"> 19 19 20 <div class="wt-account-description">20 <div> 21 21 <h2 class="title">Utilizador</h2> 22 22 23 23 <br> 24 24 25 <?php 26 if (isset($wintouch_user['Name'])) { 27 echo '<p>Nome: '.esc_html($wintouch_user['Name']).'</p>'; 28 } else { 29 echo '<p>Nome: Não definido</p>'; 30 } 25 <div class="wt-account-description"> 26 <?php 27 if (isset($wintouch_user['Name'])) { 28 echo '<p>Nome: '.esc_html($wintouch_user['Name']).'</p>'; 29 } else { 30 echo '<p>Nome: Não definido</p>'; 31 } 31 32 32 if (isset($wintouch_user['Email'])) {33 echo '<p>Email: '.esc_html($wintouch_user['Email']).'</p>';34 } else {35 echo '<p>Email: Não definido</p>';36 }33 if (isset($wintouch_user['Email'])) { 34 echo '<p>Email: '.esc_html($wintouch_user['Email']).'</p>'; 35 } else { 36 echo '<p>Email: Não definido</p>'; 37 } 37 38 38 if (isset($wintouch_user['PhoneNumber'])) { 39 echo '<p>Telemóvel: '.esc_html($wintouch_user['PhoneNumber']).'</p>'; 40 } else { 41 echo '<p>Telemóvel: Não definido</p>'; 42 } 43 ?> 39 if (isset($wintouch_user['PhoneNumber'])) { 40 echo '<p>Telemóvel: '.esc_html($wintouch_user['PhoneNumber']).'</p>'; 41 } else { 42 echo '<p>Telemóvel: Não definido</p>'; 43 } 44 ?> 45 </div> 44 46 45 47 <br> … … 56 58 57 59 <div class="wt-account-enterprise"> 58 <div class="wt-account-description">60 <div> 59 61 <h2 class="title">Empresa associada</h2> 60 62 61 63 <br> 62 64 63 <?php 64 if (isset($wintouch_enterprise['Name'])) { 65 echo '<p>Nome: '.esc_html($wintouch_enterprise['Name']).'</p>'; 66 } else { 67 echo '<p>Nome: Não definido</p>'; 68 } 65 <div class="wt-account-description"> 66 <?php 67 if (isset($wintouch_enterprise['Name'])) { 68 echo '<p>Nome: '.esc_html($wintouch_enterprise['Name']).'</p>'; 69 } else { 70 echo '<p>Nome: Não definido</p>'; 71 } 69 72 70 if (isset($wintouch_enterprise['Email'])) {71 echo '<p>Email: '.esc_html($wintouch_enterprise['Email']).'</p>';72 } else {73 echo '<p>Email: Não definido</p>';74 }73 if (isset($wintouch_enterprise['Email'])) { 74 echo '<p>Email: '.esc_html($wintouch_enterprise['Email']).'</p>'; 75 } else { 76 echo '<p>Email: Não definido</p>'; 77 } 75 78 76 if (isset($wintouch_enterprise['PhoneNumber1'])) { 77 echo '<p>Telemóvel: '.esc_html($wintouch_enterprise['PhoneNumber1']).'</p>'; 78 } else { 79 echo '<p>Telemóvel: Não definido</p>'; 80 } 81 ?> 79 if (isset($wintouch_enterprise['PhoneNumber1'])) { 80 echo '<p>Telemóvel: '.esc_html($wintouch_enterprise['PhoneNumber1']).'</p>'; 81 } else { 82 echo '<p>Telemóvel: Não definido</p>'; 83 } 84 ?> 85 </div> 82 86 83 87 <br> -
wintouch-cloud/tags/0.0.8/views/Enterprises.php
r3443376 r3454681 1 1 <?php 2 2 defined( "ABSPATH" ) || exit; 3 4 settings_errors('wintouch'); 3 5 ?> 4 6 -
wintouch-cloud/tags/0.0.8/views/General.php
r3447026 r3454681 30 30 switch ($this->activeTab) { 31 31 case 'settings': 32 include(__DIR__ . '/../views/Settings.php'); ;32 include(__DIR__ . '/../views/Settings.php'); 33 33 break; 34 34 case 'account': 35 include(__DIR__ . '/../views/Account.php'); ;35 include(__DIR__ . '/../views/Account.php'); 36 36 break; 37 37 default: 38 include(__DIR__ . '/../views/Orders.php'); ;38 include(__DIR__ . '/../views/Orders.php'); 39 39 break; 40 40 } -
wintouch-cloud/tags/0.0.8/views/Orders.php
r3443376 r3454681 97 97 ]; 98 98 99 return sprintf('%1$s %2$s', $item['docnumber'] , $this->row_actions($actions)); ;99 return sprintf('%1$s %2$s', $item['docnumber'] , $this->row_actions($actions)); 100 100 } 101 101 } -
wintouch-cloud/tags/0.0.8/wintouch-cloud.php
r3450548 r3454681 3 3 * Plugin Name: WINTOUCH Cloud 4 4 * Description: Uma ferramenta de faturação para o seu negócio. 5 * Version: 0.0. 75 * Version: 0.0.8 6 6 * Author: WINTOUCH 7 7 * Author URI: https://wintouchcloud.com -
wintouch-cloud/trunk/README.md
r3450548 r3454681 8 8 **Requires at least:** 5.0 9 9 **Tested up to:** 6.9 10 **Stable tag:** 0.0. 710 **Stable tag:** 0.0.8 11 11 **Requires PHP:** 7.2 12 12 **License:** GPLv2 or later -
wintouch-cloud/trunk/readme.txt
r3450548 r3454681 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 0.0. 76 Stable tag: 0.0.8 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later -
wintouch-cloud/trunk/src/Api.php
r3447688 r3454681 40 40 $data = json_encode([ 41 41 "store" => $storeurl, 42 "type" => "woocommerce" 42 "type" => "woocommerce", 43 "vatroundatdocument" => get_option("woocommerce_tax_round_at_subtotal") === 'yes' 43 44 ]); 44 45 … … 47 48 $body = wp_remote_retrieve_body($response); 48 49 49 return json_decode($body, true); 50 $parsed = json_decode($body, true); 51 52 if (!isset($parsed['errors'])) { 53 return $parsed; 54 } 55 56 throw new ApiException(esc_html($parsed['errors'][0]['message'])); 50 57 } 51 58 … … 75 82 76 83 public function GetEnterprises() { 77 $response = $this->Get('enterprises ');84 $response = $this->Get('enterprises?IsActive=eq=true'); 78 85 $body = wp_remote_retrieve_body($response); 79 86 $parsed = json_decode($body, true); -
wintouch-cloud/trunk/src/Authentication.php
r3448855 r3454681 56 56 $url = wp_parse_url(get_site_url(), PHP_URL_HOST); 57 57 $storeurl = preg_replace('/^www\./', '', $url); 58 (new Api())->CreateIntegration($storeurl);59 58 60 update_option('wintouch_shopurl', $storeurl, false); 61 update_option('wintouch_setting_orderstate', null, false); 62 delete_option('wintouch_setting_syncstock'); 63 delete_option('wintouch_lastsync'); 59 try { 60 $response = (new Api())->CreateIntegration($storeurl); 64 61 65 return true; 62 update_option('wintouch_shopurl', $storeurl, false); 63 update_option('wintouch_setting_orderstate', null, false); 64 65 delete_option('wintouch_setting_syncstock'); 66 delete_option('wintouch_lastsync'); 67 68 return true; 69 } catch (ApiException $ex) { 70 delete_option('wintouch_enterpriseid'); 71 delete_option('wintouch_apikey'); 72 add_settings_error('wintouch', 'wt', $ex->getMessage(), 'error'); 73 } 66 74 } 67 75 -
wintouch-cloud/trunk/views/Account.php
r3450548 r3454681 18 18 <div class="card"> 19 19 20 <div class="wt-account-description">20 <div> 21 21 <h2 class="title">Utilizador</h2> 22 22 23 23 <br> 24 24 25 <?php 26 if (isset($wintouch_user['Name'])) { 27 echo '<p>Nome: '.esc_html($wintouch_user['Name']).'</p>'; 28 } else { 29 echo '<p>Nome: Não definido</p>'; 30 } 25 <div class="wt-account-description"> 26 <?php 27 if (isset($wintouch_user['Name'])) { 28 echo '<p>Nome: '.esc_html($wintouch_user['Name']).'</p>'; 29 } else { 30 echo '<p>Nome: Não definido</p>'; 31 } 31 32 32 if (isset($wintouch_user['Email'])) {33 echo '<p>Email: '.esc_html($wintouch_user['Email']).'</p>';34 } else {35 echo '<p>Email: Não definido</p>';36 }33 if (isset($wintouch_user['Email'])) { 34 echo '<p>Email: '.esc_html($wintouch_user['Email']).'</p>'; 35 } else { 36 echo '<p>Email: Não definido</p>'; 37 } 37 38 38 if (isset($wintouch_user['PhoneNumber'])) { 39 echo '<p>Telemóvel: '.esc_html($wintouch_user['PhoneNumber']).'</p>'; 40 } else { 41 echo '<p>Telemóvel: Não definido</p>'; 42 } 43 ?> 39 if (isset($wintouch_user['PhoneNumber'])) { 40 echo '<p>Telemóvel: '.esc_html($wintouch_user['PhoneNumber']).'</p>'; 41 } else { 42 echo '<p>Telemóvel: Não definido</p>'; 43 } 44 ?> 45 </div> 44 46 45 47 <br> … … 56 58 57 59 <div class="wt-account-enterprise"> 58 <div class="wt-account-description">60 <div> 59 61 <h2 class="title">Empresa associada</h2> 60 62 61 63 <br> 62 64 63 <?php 64 if (isset($wintouch_enterprise['Name'])) { 65 echo '<p>Nome: '.esc_html($wintouch_enterprise['Name']).'</p>'; 66 } else { 67 echo '<p>Nome: Não definido</p>'; 68 } 65 <div class="wt-account-description"> 66 <?php 67 if (isset($wintouch_enterprise['Name'])) { 68 echo '<p>Nome: '.esc_html($wintouch_enterprise['Name']).'</p>'; 69 } else { 70 echo '<p>Nome: Não definido</p>'; 71 } 69 72 70 if (isset($wintouch_enterprise['Email'])) {71 echo '<p>Email: '.esc_html($wintouch_enterprise['Email']).'</p>';72 } else {73 echo '<p>Email: Não definido</p>';74 }73 if (isset($wintouch_enterprise['Email'])) { 74 echo '<p>Email: '.esc_html($wintouch_enterprise['Email']).'</p>'; 75 } else { 76 echo '<p>Email: Não definido</p>'; 77 } 75 78 76 if (isset($wintouch_enterprise['PhoneNumber1'])) { 77 echo '<p>Telemóvel: '.esc_html($wintouch_enterprise['PhoneNumber1']).'</p>'; 78 } else { 79 echo '<p>Telemóvel: Não definido</p>'; 80 } 81 ?> 79 if (isset($wintouch_enterprise['PhoneNumber1'])) { 80 echo '<p>Telemóvel: '.esc_html($wintouch_enterprise['PhoneNumber1']).'</p>'; 81 } else { 82 echo '<p>Telemóvel: Não definido</p>'; 83 } 84 ?> 85 </div> 82 86 83 87 <br> -
wintouch-cloud/trunk/views/Enterprises.php
r3443376 r3454681 1 1 <?php 2 2 defined( "ABSPATH" ) || exit; 3 4 settings_errors('wintouch'); 3 5 ?> 4 6 -
wintouch-cloud/trunk/views/General.php
r3447026 r3454681 30 30 switch ($this->activeTab) { 31 31 case 'settings': 32 include(__DIR__ . '/../views/Settings.php'); ;32 include(__DIR__ . '/../views/Settings.php'); 33 33 break; 34 34 case 'account': 35 include(__DIR__ . '/../views/Account.php'); ;35 include(__DIR__ . '/../views/Account.php'); 36 36 break; 37 37 default: 38 include(__DIR__ . '/../views/Orders.php'); ;38 include(__DIR__ . '/../views/Orders.php'); 39 39 break; 40 40 } -
wintouch-cloud/trunk/views/Orders.php
r3443376 r3454681 97 97 ]; 98 98 99 return sprintf('%1$s %2$s', $item['docnumber'] , $this->row_actions($actions)); ;99 return sprintf('%1$s %2$s', $item['docnumber'] , $this->row_actions($actions)); 100 100 } 101 101 } -
wintouch-cloud/trunk/wintouch-cloud.php
r3450548 r3454681 3 3 * Plugin Name: WINTOUCH Cloud 4 4 * Description: Uma ferramenta de faturação para o seu negócio. 5 * Version: 0.0. 75 * Version: 0.0.8 6 6 * Author: WINTOUCH 7 7 * Author URI: https://wintouchcloud.com
Note: See TracChangeset
for help on using the changeset viewer.