Changeset 3094250
- Timestamp:
- 05/29/2024 05:35:04 AM (23 months ago)
- Location:
- infast
- Files:
-
- 5 deleted
- 9 edited
- 13 copied
-
tags/1.0.28 (copied) (copied from infast/trunk)
-
tags/1.0.28/README.txt (copied) (copied from infast/trunk/README.txt) (2 diffs)
-
tags/1.0.28/README_DEV.txt (copied) (copied from infast/trunk/README_DEV.txt)
-
tags/1.0.28/admin/class-infast-woocommerce-admin-settings.php (copied) (copied from infast/trunk/admin/class-infast-woocommerce-admin-settings.php) (6 diffs)
-
tags/1.0.28/admin/class-infast-woocommerce-admin.php (copied) (copied from infast/trunk/admin/class-infast-woocommerce-admin.php) (1 diff)
-
tags/1.0.28/docker-compose.yml (deleted)
-
tags/1.0.28/includes/class-infast-woocommerce-activator.php (modified) (2 diffs)
-
tags/1.0.28/includes/class-infast-woocommerce-i18n.php (copied) (copied from infast/trunk/includes/class-infast-woocommerce-i18n.php)
-
tags/1.0.28/includes/class-infast-woocommerce.php (copied) (copied from infast/trunk/includes/class-infast-woocommerce.php)
-
tags/1.0.28/includes/index.php (deleted)
-
tags/1.0.28/includes/infast-api/class-infast-woocommerce-auth-api.php (copied) (copied from infast/trunk/includes/infast-api/class-infast-woocommerce-auth-api.php) (1 diff)
-
tags/1.0.28/includes/infast-api/class-infast-woocommerce-customer-api.php (copied) (copied from infast/trunk/includes/infast-api/class-infast-woocommerce-customer-api.php)
-
tags/1.0.28/includes/infast-api/class-infast-woocommerce-document-api.php (copied) (copied from infast/trunk/includes/infast-api/class-infast-woocommerce-document-api.php)
-
tags/1.0.28/includes/infast-api/class-infast-woocommerce-item-api.php (modified) (1 diff)
-
tags/1.0.28/infast-woocommerce.php (copied) (copied from infast/trunk/infast-woocommerce.php) (2 diffs)
-
tags/1.0.28/languages/infast-fr_FR.mo (copied) (copied from infast/trunk/languages/infast-fr_FR.mo)
-
tags/1.0.28/languages/infast-fr_FR.po (copied) (copied from infast/trunk/languages/infast-fr_FR.po)
-
tags/1.0.28/languages/infast-woocommerce-fr_FR.mo (deleted)
-
tags/1.0.28/languages/infast-woocommerce-fr_FR.po (deleted)
-
tags/1.0.28/languages/infast-woocommerce.pot (deleted)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/admin/class-infast-woocommerce-admin-settings.php (modified) (6 diffs)
-
trunk/admin/class-infast-woocommerce-admin.php (modified) (1 diff)
-
trunk/includes/class-infast-woocommerce-activator.php (modified) (2 diffs)
-
trunk/includes/infast-api/class-infast-woocommerce-auth-api.php (modified) (1 diff)
-
trunk/includes/infast-api/class-infast-woocommerce-item-api.php (modified) (1 diff)
-
trunk/infast-woocommerce.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
infast/tags/1.0.28/README.txt
r3094190 r3094250 4 4 Requires at least: 5.6 5 5 Tested up to: 6.5.3 6 Requires PHP: 7. 27 Stable tag: 1.0.2 76 Requires PHP: 7.0* 7 Stable tag: 1.0.28 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 127 127 128 128 == Changelog == 129 = Version 1.0.28 = 130 - Amélioration interne 131 129 132 = Version 1.0.27 = 130 133 - Amélioration interne : Vérification que le plugin WooCommerce est activé -
infast/tags/1.0.28/admin/class-infast-woocommerce-admin-settings.php
r3094190 r3094250 138 138 139 139 $options = get_option( 'infast_woocommerce' ); 140 $ value= '';141 if( is_array($options) ) {142 $ value= $options['client_id'];143 } 144 145 ?> 146 <input type='text' name='infast_woocommerce[client_id]' id="infast-client-id" value='<?php echo esc_attr( $ value); ?>'>140 $client_id = ''; 141 if( is_array($options) && array_key_exists('client_id', $options)) { 142 $client_id = $options['client_id']; 143 } 144 145 ?> 146 <input type='text' name='infast_woocommerce[client_id]' id="infast-client-id" value='<?php echo esc_attr( $client_id ); ?>'> 147 147 <?php 148 148 … … 157 157 158 158 $options = get_option( 'infast_woocommerce' ); 159 if ( $options && array_key_exists( 'client_secret', $options ) ) {160 $value = $options['client_secret'];161 if ( ! empty( $value ) )162 $value = '*******************************';163 } else164 $value = '';165 ?> 166 <input type='text' name='infast_woocommerce[client_secret]' id="infast-client-secret" value='<?php echo esc_attr( $ value); ?>'>159 $client_secret = ''; 160 if ( is_array($options) && array_key_exists( 'client_secret', $options ) ) { 161 $client_secret = $options['client_secret']; 162 if ( ! empty( $client_secret ) ) 163 $client_secret = '*******************************'; 164 } 165 ?> 166 <input type='text' name='infast_woocommerce[client_secret]' id="infast-client-secret" value='<?php echo esc_attr( $client_secret ); ?>'> 167 167 <?php 168 168 } … … 176 176 177 177 $options = get_option( 'infast_woocommerce' ); 178 ?> 179 <input type="checkbox" name="infast_woocommerce[enable_email]" value="1" <?php if ( isset( $options['enable_email'] ) ) checked( $options['enable_email'], 1 ); ?> 178 $enable_email = false; 179 if( is_array($options) && array_key_exists('enable_email', $options)) { 180 $enable_email = $options['enable_email']; 181 } 182 ?> 183 <input type="checkbox" name="infast_woocommerce[enable_email]" value="1" <?php if ( isset ( $enable_email ) ) checked( $enable_email, 1 ); ?> 180 184 <?php 181 185 … … 190 194 191 195 $options = get_option( 'infast_woocommerce' ); 192 ?> 193 <input type="email" name="infast_woocommerce[cc_email]" value="<?php if ( isset ( $options['cc_email'] ) ) echo esc_attr( $options['cc_email'] ); ?>" /> 196 $cc_email = false; 197 if( is_array($options) && array_key_exists('cc_email', $options)) { 198 $cc_email = $options['cc_email']; 199 } 200 ?> 201 <input type="email" name="infast_woocommerce[cc_email]" value="<?php if ( isset ( $cc_email ) ) echo esc_attr( $cc_email ); ?>" /> 194 202 <?php 195 203 … … 204 212 205 213 $options = get_option( 'infast_woocommerce' ); 206 ?> 207 <input type="checkbox" name="infast_woocommerce[omit_item_description]" value="1" <?php if ( isset( $options['omit_item_description'] ) ) checked( $options['omit_item_description'], 1 ); ?> /> 214 $omit_item_description = false; 215 if( is_array($options) && array_key_exists('omit_item_description', $options)) { 216 $omit_item_description = $options['omit_item_description']; 217 } 218 ?> 219 <input type="checkbox" name="infast_woocommerce[omit_item_description]" value="1" <?php if ( isset( $omit_item_description ) ) checked( $omit_item_description, 1 ); ?> /> 208 220 <?php 209 221 … … 369 381 370 382 if ( $option == 'infast_woocommerce' ) { 371 if ( ( ! empty( $value['client_id'] ) && ! empty( $value['client_secret'] ) ) && 372 ( $value['client_id'] != $old_value['client_id'] || 373 $value['client_secret'] != $old_value['client_secret'] ) ) { 383 $old_client_id = ''; 384 $old_client_secret = ''; 385 $new_client_id = ''; 386 $new_client_secret = ''; 387 if( is_array($value) && array_key_exists('client_id', $value)) { 388 $new_client_id = $value['client_id']; 389 } 390 if( is_array($value) && array_key_exists('client_secret', $value)) { 391 $new_client_secret = $value['client_secret']; 392 } 393 if( is_array($old_value) && array_key_exists('client_id', $old_value)) { 394 $old_client_id = $old_value['client_id']; 395 } 396 if( is_array($old_value) && array_key_exists('client_secret', $old_value)) { 397 $old_client_secret = $old_value['client_secret']; 398 } 399 400 if ( ( ! empty( $new_client_id ) && ! empty( $new_client_secret ) ) && 401 ( $new_client_id != $old_client_id || 402 $new_client_secret != $old_client_secret ) ) { 374 403 375 404 $infast_auth_api = Infast_Woocommerce_Auth_Api::getInstance(); -
infast/tags/1.0.28/admin/class-infast-woocommerce-admin.php
r3094190 r3094250 264 264 265 265 public function http_headers_useragent( $user_agent, $url) { 266 return $user_agent . '; infast-plugin-version/1.0.2 7';266 return $user_agent . '; infast-plugin-version/1.0.28'; 267 267 } 268 268 -
infast/tags/1.0.28/includes/class-infast-woocommerce-activator.php
r2608798 r3094250 35 35 if ( ! $stored_saltkey1 || empty( $stored_saltkey1 ) ) { 36 36 $salt_key1 = bin2hex( random_bytes( 20 ) ); 37 add_option( 'infast_saltkey_1', $salt_key1 , 'no');37 add_option( 'infast_saltkey_1', $salt_key1 ); 38 38 } 39 39 … … 41 41 if ( ! $stored_saltkey2 || empty( $stored_saltkey2 ) ) { 42 42 $salt_key2 = bin2hex( random_bytes( 20 ) ); 43 add_option( 'infast_saltkey_2', $salt_key2 , 'no');43 add_option( 'infast_saltkey_2', $salt_key2 ); 44 44 } 45 45 -
infast/tags/1.0.28/includes/infast-api/class-infast-woocommerce-auth-api.php
r3094021 r3094250 88 88 $url = INFAST_API_URL . 'oauth2/token'; 89 89 90 $client_id = ''; 91 $client_secret = ''; 92 90 93 $options = get_option( 'infast_woocommerce' ); 91 $client_secret = $this->decrypt_key( $options['client_secret'] ); 94 if( is_array($options) && array_key_exists('client_id', $options)) { 95 $client_id = $options['client_id']; 96 } 97 if( is_array($options) && array_key_exists('client_secret', $options)) { 98 $client_secret = $options['client_secret']; 99 } 100 101 $client_secret = $this->decrypt_key( $client_secret ); 92 102 $body = array( 93 'client_id' => $ options['client_id'],103 'client_id' => $client_id , 94 104 'client_secret' => $client_secret, 95 105 'grant_type' => 'client_credentials', -
infast/tags/1.0.28/includes/infast-api/class-infast-woocommerce-item-api.php
r2873870 r3094250 55 55 public function get_product_description( $product ) { 56 56 $description = ''; 57 58 $omit_item_description = false; 57 59 $options = get_option( 'infast_woocommerce' ); 58 if ( !$options['omit_item_description'] ) { 60 if( is_array($options) && array_key_exists('omit_item_description', $options)) { 61 $omit_item_description = $options['omit_item_description']; 62 } 63 64 if ( !$omit_item_description ) { 59 65 // $description = 60 66 // $product->get_description() -
infast/tags/1.0.28/infast-woocommerce.php
r3094190 r3094250 17 17 * Plugin URI: https://intia.fr/fr/plugin-woocommerce 18 18 * Description: Create and email compliant invoices automatically with every order placed on your WooCommerce e-shop. 19 * Version: 1.0.2 719 * Version: 1.0.28 20 20 * Author: INTIA 21 21 * Author URI: https://intia.fr … … 38 38 * Rename this for your plugin and update it as you release new versions. 39 39 */ 40 define( 'INFAST_WOOCOMMERCE_VERSION', '1.0.2 7' );40 define( 'INFAST_WOOCOMMERCE_VERSION', '1.0.28' ); 41 41 42 42 /** -
infast/trunk/README.txt
r3094190 r3094250 4 4 Requires at least: 5.6 5 5 Tested up to: 6.5.3 6 Requires PHP: 7. 27 Stable tag: 1.0.2 76 Requires PHP: 7.0* 7 Stable tag: 1.0.28 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 127 127 128 128 == Changelog == 129 = Version 1.0.28 = 130 - Amélioration interne 131 129 132 = Version 1.0.27 = 130 133 - Amélioration interne : Vérification que le plugin WooCommerce est activé -
infast/trunk/admin/class-infast-woocommerce-admin-settings.php
r3094190 r3094250 138 138 139 139 $options = get_option( 'infast_woocommerce' ); 140 $ value= '';141 if( is_array($options) ) {142 $ value= $options['client_id'];143 } 144 145 ?> 146 <input type='text' name='infast_woocommerce[client_id]' id="infast-client-id" value='<?php echo esc_attr( $ value); ?>'>140 $client_id = ''; 141 if( is_array($options) && array_key_exists('client_id', $options)) { 142 $client_id = $options['client_id']; 143 } 144 145 ?> 146 <input type='text' name='infast_woocommerce[client_id]' id="infast-client-id" value='<?php echo esc_attr( $client_id ); ?>'> 147 147 <?php 148 148 … … 157 157 158 158 $options = get_option( 'infast_woocommerce' ); 159 if ( $options && array_key_exists( 'client_secret', $options ) ) {160 $value = $options['client_secret'];161 if ( ! empty( $value ) )162 $value = '*******************************';163 } else164 $value = '';165 ?> 166 <input type='text' name='infast_woocommerce[client_secret]' id="infast-client-secret" value='<?php echo esc_attr( $ value); ?>'>159 $client_secret = ''; 160 if ( is_array($options) && array_key_exists( 'client_secret', $options ) ) { 161 $client_secret = $options['client_secret']; 162 if ( ! empty( $client_secret ) ) 163 $client_secret = '*******************************'; 164 } 165 ?> 166 <input type='text' name='infast_woocommerce[client_secret]' id="infast-client-secret" value='<?php echo esc_attr( $client_secret ); ?>'> 167 167 <?php 168 168 } … … 176 176 177 177 $options = get_option( 'infast_woocommerce' ); 178 ?> 179 <input type="checkbox" name="infast_woocommerce[enable_email]" value="1" <?php if ( isset( $options['enable_email'] ) ) checked( $options['enable_email'], 1 ); ?> 178 $enable_email = false; 179 if( is_array($options) && array_key_exists('enable_email', $options)) { 180 $enable_email = $options['enable_email']; 181 } 182 ?> 183 <input type="checkbox" name="infast_woocommerce[enable_email]" value="1" <?php if ( isset ( $enable_email ) ) checked( $enable_email, 1 ); ?> 180 184 <?php 181 185 … … 190 194 191 195 $options = get_option( 'infast_woocommerce' ); 192 ?> 193 <input type="email" name="infast_woocommerce[cc_email]" value="<?php if ( isset ( $options['cc_email'] ) ) echo esc_attr( $options['cc_email'] ); ?>" /> 196 $cc_email = false; 197 if( is_array($options) && array_key_exists('cc_email', $options)) { 198 $cc_email = $options['cc_email']; 199 } 200 ?> 201 <input type="email" name="infast_woocommerce[cc_email]" value="<?php if ( isset ( $cc_email ) ) echo esc_attr( $cc_email ); ?>" /> 194 202 <?php 195 203 … … 204 212 205 213 $options = get_option( 'infast_woocommerce' ); 206 ?> 207 <input type="checkbox" name="infast_woocommerce[omit_item_description]" value="1" <?php if ( isset( $options['omit_item_description'] ) ) checked( $options['omit_item_description'], 1 ); ?> /> 214 $omit_item_description = false; 215 if( is_array($options) && array_key_exists('omit_item_description', $options)) { 216 $omit_item_description = $options['omit_item_description']; 217 } 218 ?> 219 <input type="checkbox" name="infast_woocommerce[omit_item_description]" value="1" <?php if ( isset( $omit_item_description ) ) checked( $omit_item_description, 1 ); ?> /> 208 220 <?php 209 221 … … 369 381 370 382 if ( $option == 'infast_woocommerce' ) { 371 if ( ( ! empty( $value['client_id'] ) && ! empty( $value['client_secret'] ) ) && 372 ( $value['client_id'] != $old_value['client_id'] || 373 $value['client_secret'] != $old_value['client_secret'] ) ) { 383 $old_client_id = ''; 384 $old_client_secret = ''; 385 $new_client_id = ''; 386 $new_client_secret = ''; 387 if( is_array($value) && array_key_exists('client_id', $value)) { 388 $new_client_id = $value['client_id']; 389 } 390 if( is_array($value) && array_key_exists('client_secret', $value)) { 391 $new_client_secret = $value['client_secret']; 392 } 393 if( is_array($old_value) && array_key_exists('client_id', $old_value)) { 394 $old_client_id = $old_value['client_id']; 395 } 396 if( is_array($old_value) && array_key_exists('client_secret', $old_value)) { 397 $old_client_secret = $old_value['client_secret']; 398 } 399 400 if ( ( ! empty( $new_client_id ) && ! empty( $new_client_secret ) ) && 401 ( $new_client_id != $old_client_id || 402 $new_client_secret != $old_client_secret ) ) { 374 403 375 404 $infast_auth_api = Infast_Woocommerce_Auth_Api::getInstance(); -
infast/trunk/admin/class-infast-woocommerce-admin.php
r3094190 r3094250 264 264 265 265 public function http_headers_useragent( $user_agent, $url) { 266 return $user_agent . '; infast-plugin-version/1.0.2 7';266 return $user_agent . '; infast-plugin-version/1.0.28'; 267 267 } 268 268 -
infast/trunk/includes/class-infast-woocommerce-activator.php
r2608798 r3094250 35 35 if ( ! $stored_saltkey1 || empty( $stored_saltkey1 ) ) { 36 36 $salt_key1 = bin2hex( random_bytes( 20 ) ); 37 add_option( 'infast_saltkey_1', $salt_key1 , 'no');37 add_option( 'infast_saltkey_1', $salt_key1 ); 38 38 } 39 39 … … 41 41 if ( ! $stored_saltkey2 || empty( $stored_saltkey2 ) ) { 42 42 $salt_key2 = bin2hex( random_bytes( 20 ) ); 43 add_option( 'infast_saltkey_2', $salt_key2 , 'no');43 add_option( 'infast_saltkey_2', $salt_key2 ); 44 44 } 45 45 -
infast/trunk/includes/infast-api/class-infast-woocommerce-auth-api.php
r3094021 r3094250 88 88 $url = INFAST_API_URL . 'oauth2/token'; 89 89 90 $client_id = ''; 91 $client_secret = ''; 92 90 93 $options = get_option( 'infast_woocommerce' ); 91 $client_secret = $this->decrypt_key( $options['client_secret'] ); 94 if( is_array($options) && array_key_exists('client_id', $options)) { 95 $client_id = $options['client_id']; 96 } 97 if( is_array($options) && array_key_exists('client_secret', $options)) { 98 $client_secret = $options['client_secret']; 99 } 100 101 $client_secret = $this->decrypt_key( $client_secret ); 92 102 $body = array( 93 'client_id' => $ options['client_id'],103 'client_id' => $client_id , 94 104 'client_secret' => $client_secret, 95 105 'grant_type' => 'client_credentials', -
infast/trunk/includes/infast-api/class-infast-woocommerce-item-api.php
r2873870 r3094250 55 55 public function get_product_description( $product ) { 56 56 $description = ''; 57 58 $omit_item_description = false; 57 59 $options = get_option( 'infast_woocommerce' ); 58 if ( !$options['omit_item_description'] ) { 60 if( is_array($options) && array_key_exists('omit_item_description', $options)) { 61 $omit_item_description = $options['omit_item_description']; 62 } 63 64 if ( !$omit_item_description ) { 59 65 // $description = 60 66 // $product->get_description() -
infast/trunk/infast-woocommerce.php
r3094190 r3094250 17 17 * Plugin URI: https://intia.fr/fr/plugin-woocommerce 18 18 * Description: Create and email compliant invoices automatically with every order placed on your WooCommerce e-shop. 19 * Version: 1.0.2 719 * Version: 1.0.28 20 20 * Author: INTIA 21 21 * Author URI: https://intia.fr … … 38 38 * Rename this for your plugin and update it as you release new versions. 39 39 */ 40 define( 'INFAST_WOOCOMMERCE_VERSION', '1.0.2 7' );40 define( 'INFAST_WOOCOMMERCE_VERSION', '1.0.28' ); 41 41 42 42 /**
Note: See TracChangeset
for help on using the changeset viewer.