Changeset 2947672
- Timestamp:
- 08/04/2023 11:24:07 AM (3 years ago)
- Location:
- gelato-integration-for-woocommerce/trunk
- Files:
-
- 4 edited
-
gelato-integration-for-woocommerce.php (modified) (2 diffs)
-
includes/Pages/GelatoStatusPage.php (modified) (2 diffs)
-
includes/StatusChecker/GelatoStatusChecker.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gelato-integration-for-woocommerce/trunk/gelato-integration-for-woocommerce.php
r2947207 r2947672 5 5 * Plugin URI: https:// 6 6 * Description: This plugin helps to connect your WooCommerce store with Gelato . 7 * Version: 1.2. 07 * Version: 1.2.1 8 8 * Author: Gelato 9 9 * Author URI: https://gelato.com … … 12 12 */ 13 13 14 define('GELATO_VERSION', '1.2. 0');14 define('GELATO_VERSION', '1.2.1'); 15 15 define('GELATO_MINIMUM_WP_VERSION', '4.0'); 16 16 -
gelato-integration-for-woocommerce/trunk/includes/Pages/GelatoStatusPage.php
r2771476 r2947672 45 45 echo "* "; 46 46 echo str_pad(esc_html($result['name']), 30) . '=> ' . esc_html($result['status']) . "\n"; 47 } 48 49 echo "\n\n##### Additional Information #####\n"; 50 foreach ($this->get_additional_info() as $name => $value) { 51 echo "* "; 52 echo str_pad(esc_html($name), 30) . '=> ' . esc_html($value) . "\n"; 47 53 } 48 54 … … 96 102 'WC is log folder writable' => (bool) @fopen( WC_LOG_DIR . 'test-log.log', 'a' ), // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_system_read_fopen 97 103 ); 104 } 105 106 public function get_additional_info() 107 { 108 $siteUrl = get_option('home'); 109 $requestBasic = $this->gelatoStatusChecker->get_basic_redirect_request($siteUrl); 110 $requestSlashed = $this->gelatoStatusChecker->get_slashed_redirect_request($siteUrl); 111 112 $additionalInformation = array(); 113 114 if(is_wp_error($requestBasic)) { 115 $additionalInformation['Redirect Site basic error'] = is_wp_error($requestBasic); 116 $additionalInformation['Redirect Site basic error message'] = $requestBasic->get_error_message(); 117 } 118 119 if(is_wp_error($requestSlashed)) { 120 $additionalInformation['Redirect Site slashed error'] = is_wp_error($requestSlashed); 121 $additionalInformation['Redirect Site slashed error message'] = $requestSlashed->get_error_message(); 122 } 123 124 return $additionalInformation; 98 125 } 99 126 -
gelato-integration-for-woocommerce/trunk/includes/StatusChecker/GelatoStatusChecker.php
r2916413 r2947672 228 228 } 229 229 230 public function get_basic_redirect_request($siteUrl) 231 { 232 return wp_remote_head( $siteUrl . '/wp-json/', ['redirection' => 0, 'timeout' => 30]); 233 } 234 235 public function get_slashed_redirect_request($siteUrl) 236 { 237 return wp_remote_head( trailingslashit($siteUrl), ['redirection' => 0, 'timeout' => 30]); 238 } 239 230 240 private function test_php_memory_limit() 231 241 { … … 275 285 { 276 286 $siteUrl = get_option('home'); 277 $requestBasic = wp_remote_head( $siteUrl . '/wp-json/', ['redirection' => 0]);278 $requestSlashed = wp_remote_head( trailingslashit($siteUrl), ['redirection' => 0]);287 $requestBasic = $this->get_basic_redirect_request($siteUrl); 288 $requestSlashed = $this->get_slashed_redirect_request($siteUrl); 279 289 280 290 if (is_wp_error($requestBasic) || is_wp_error($requestSlashed)) { -
gelato-integration-for-woocommerce/trunk/readme.txt
r2947207 r2947672 8 8 Requires at least: 3.8 9 9 Tested up to: 6.2 10 Stable tag: 1.2. 010 Stable tag: 1.2.1 11 11 Requires PHP: 7.0 12 12 License: GPLv2 or later … … 92 92 = 1.2.0 = 93 93 * Fixed issue with duplicate variant ids 94 95 = 1.2.1 = 96 * Improvements for redirect check and status page
Note: See TracChangeset
for help on using the changeset viewer.