Changeset 3139965
- Timestamp:
- 08/22/2024 08:52:20 PM (19 months ago)
- Location:
- bigcommerce
- Files:
-
- 10 edited
- 1 copied
-
tags/5.1.0 (copied) (copied from bigcommerce/trunk)
-
tags/5.1.0/CHANGELOG.md (modified) (2 diffs)
-
tags/5.1.0/bigcommerce.php (modified) (1 diff)
-
tags/5.1.0/readme.txt (modified) (1 diff)
-
tags/5.1.0/src/BigCommerce/Import/Processors/Category_Import.php (modified) (1 diff)
-
tags/5.1.0/src/BigCommerce/Plugin.php (modified) (1 diff)
-
trunk/CHANGELOG.md (modified) (2 diffs)
-
trunk/bigcommerce.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/src/BigCommerce/Import/Processors/Category_Import.php (modified) (1 diff)
-
trunk/src/BigCommerce/Plugin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bigcommerce/tags/5.1.0/CHANGELOG.md
r3127781 r3139965 1 1 # Changelog 2 3 ## [5.1.0] 4 5 ### Changed 6 - Sync all categories for MSF stores via API 2 7 3 8 ## [5.0.8] … … 1920 1925 1921 1926 1927 [5.1.0]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.8...5.1.0 1922 1928 [5.0.8]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.7...5.0.8 1923 1929 [5.0.7]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.6...5.0.7 -
bigcommerce/tags/5.1.0/bigcommerce.php
r3127781 r3139965 4 4 Description: Scale your ecommerce business with WordPress on the front-end and BigCommerce on the back end. Free up server resources from things like catalog management, processing payments, and managing fulfillment logistics. 5 5 Author: BigCommerce 6 Version: 5. 0.86 Version: 5.1.0 7 7 Author URI: https://www.bigcommerce.com/wordpress 8 8 Requires PHP: 7.4.0 -
bigcommerce/tags/5.1.0/readme.txt
r3127781 r3139965 4 4 Requires at least: 5.2 5 5 Tested up to: 6.6 6 Stable tag: 5. 0.86 Stable tag: 5.1.0 7 7 Requires PHP: 7.4.0 8 8 License: GPLv2 or later -
bigcommerce/tags/5.1.0/src/BigCommerce/Import/Processors/Category_Import.php
r2865940 r3139965 30 30 try { 31 31 if ( Store_Settings::is_msf_on() ) { 32 $data = $this->get_msf_categories( $this->catalog_api );33 32 34 if ( ! empty( $data ) ) { 35 return $data->getData(); 33 /* loop though all categories and return $allCategories */ 34 $allCategories = []; 35 $currentPage = 1; 36 $totalPages = 1; 37 38 do { 39 40 $params['page'] = $currentPage; 41 42 $data = $this->get_msf_categories( $this->catalog_api, $params); 43 44 if ( ! empty( $data ) ) { 45 46 $currentData = $data->getData(); 47 48 if (is_array($currentData) && !empty($currentData)) { 49 $allCategories = array_merge($allCategories, $currentData); 50 } else { 51 do_action('bigcommerce/log', Error_Log::WARNING, __('Current data is not an array or is empty.', 'bigcommerce'), []); 52 } 53 54 if ( method_exists( $data, 'getMeta' ) ){ 55 $meta = $data->getMeta(); 56 if ( isset( $meta['pagination']['current_page'] ) && isset( $meta['pagination']['total_pages'] ) ) { 57 $currentPage = $meta['pagination']['current_page']; 58 $totalPages = $meta['pagination']['total_pages']; 59 } else { 60 do_action( 'bigcommerce/log', Error_Log::WARNING, __( 'Pagination information is missing in the response meta.', 'bigcommerce' ), [] ); 61 break; // Exit the loop 62 } 63 } else { 64 do_action('bigcommerce/log', Error_Log::WARNING, __('getMeta method does not exist on the data object.', 'bigcommerce'), []); 65 break; // Exit the loop 66 } 67 } else { 68 do_action('bigcommerce/log', Error_Log::WARNING, __('No data returned from get_msf_categories.', 'bigcommerce'), []); 69 break; // Exit the loop 70 } 71 72 do_action( 'bigcommerce/log', Error_Log::INFO, __( "Category import Page $currentPage of $totalPages", 'bigcommerce' ), [] ); 73 $currentPage ++; 74 75 } while ( $currentPage <= $totalPages ); 76 77 do_action( 'bigcommerce/log', Error_Log::INFO, __( "Total categories found: ".count($allCategories) , 'bigcommerce' ), [] ); 78 79 if ( ! empty( $allCategories ) ) { 80 return $allCategories; 36 81 } 82 37 83 } 38 84 -
bigcommerce/tags/5.1.0/src/BigCommerce/Plugin.php
r3127781 r3139965 5 5 6 6 class Plugin { 7 const VERSION = '5. 0.8';7 const VERSION = '5.1.0'; 8 8 9 9 protected static $_instance; -
bigcommerce/trunk/CHANGELOG.md
r3127781 r3139965 1 1 # Changelog 2 3 ## [5.1.0] 4 5 ### Changed 6 - Sync all categories for MSF stores via API 2 7 3 8 ## [5.0.8] … … 1920 1925 1921 1926 1927 [5.1.0]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.8...5.1.0 1922 1928 [5.0.8]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.7...5.0.8 1923 1929 [5.0.7]: https://github.com/bigcommerce/bigcommerce-for-wordpress/compare/5.0.6...5.0.7 -
bigcommerce/trunk/bigcommerce.php
r3127781 r3139965 4 4 Description: Scale your ecommerce business with WordPress on the front-end and BigCommerce on the back end. Free up server resources from things like catalog management, processing payments, and managing fulfillment logistics. 5 5 Author: BigCommerce 6 Version: 5. 0.86 Version: 5.1.0 7 7 Author URI: https://www.bigcommerce.com/wordpress 8 8 Requires PHP: 7.4.0 -
bigcommerce/trunk/readme.txt
r3127781 r3139965 4 4 Requires at least: 5.2 5 5 Tested up to: 6.6 6 Stable tag: 5. 0.86 Stable tag: 5.1.0 7 7 Requires PHP: 7.4.0 8 8 License: GPLv2 or later -
bigcommerce/trunk/src/BigCommerce/Import/Processors/Category_Import.php
r2865940 r3139965 30 30 try { 31 31 if ( Store_Settings::is_msf_on() ) { 32 $data = $this->get_msf_categories( $this->catalog_api );33 32 34 if ( ! empty( $data ) ) { 35 return $data->getData(); 33 /* loop though all categories and return $allCategories */ 34 $allCategories = []; 35 $currentPage = 1; 36 $totalPages = 1; 37 38 do { 39 40 $params['page'] = $currentPage; 41 42 $data = $this->get_msf_categories( $this->catalog_api, $params); 43 44 if ( ! empty( $data ) ) { 45 46 $currentData = $data->getData(); 47 48 if (is_array($currentData) && !empty($currentData)) { 49 $allCategories = array_merge($allCategories, $currentData); 50 } else { 51 do_action('bigcommerce/log', Error_Log::WARNING, __('Current data is not an array or is empty.', 'bigcommerce'), []); 52 } 53 54 if ( method_exists( $data, 'getMeta' ) ){ 55 $meta = $data->getMeta(); 56 if ( isset( $meta['pagination']['current_page'] ) && isset( $meta['pagination']['total_pages'] ) ) { 57 $currentPage = $meta['pagination']['current_page']; 58 $totalPages = $meta['pagination']['total_pages']; 59 } else { 60 do_action( 'bigcommerce/log', Error_Log::WARNING, __( 'Pagination information is missing in the response meta.', 'bigcommerce' ), [] ); 61 break; // Exit the loop 62 } 63 } else { 64 do_action('bigcommerce/log', Error_Log::WARNING, __('getMeta method does not exist on the data object.', 'bigcommerce'), []); 65 break; // Exit the loop 66 } 67 } else { 68 do_action('bigcommerce/log', Error_Log::WARNING, __('No data returned from get_msf_categories.', 'bigcommerce'), []); 69 break; // Exit the loop 70 } 71 72 do_action( 'bigcommerce/log', Error_Log::INFO, __( "Category import Page $currentPage of $totalPages", 'bigcommerce' ), [] ); 73 $currentPage ++; 74 75 } while ( $currentPage <= $totalPages ); 76 77 do_action( 'bigcommerce/log', Error_Log::INFO, __( "Total categories found: ".count($allCategories) , 'bigcommerce' ), [] ); 78 79 if ( ! empty( $allCategories ) ) { 80 return $allCategories; 36 81 } 82 37 83 } 38 84 -
bigcommerce/trunk/src/BigCommerce/Plugin.php
r3127781 r3139965 5 5 6 6 class Plugin { 7 const VERSION = '5. 0.8';7 const VERSION = '5.1.0'; 8 8 9 9 protected static $_instance;
Note: See TracChangeset
for help on using the changeset viewer.