Skip to content

Commit

Permalink
Merge pull request #288 from Ecwid/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
meteor-ec authored Jul 16, 2024
2 parents cea0f2e + cac5c17 commit 62617e7
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
== Changelog ==
= 6.12.16 - Jul 16, 2024 =
- Resolved an issue with the store sometimes failing to connect to a plugin.
- Additionally, we've fixed a problem that in some cases caused direct category links to display a 404 Not Found page.

= 6.12.15 - Jul 11, 2024 =
- After the last update, the our ecommerce plugin could cause an issue with urls and an issue with loading the admin area. We have fixed these issues.

Expand Down
7 changes: 5 additions & 2 deletions ecwid-shopping-cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Description: Ecwid by Lightspeed is a free full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up.
Text Domain: ecwid-shopping-cart
Author: Ecwid Ecommerce
Version: 6.12.15
Version: 6.12.16
Author URI: https://ecwid.to/ecwid-site
License: GPLv2 or later
*/
Expand Down Expand Up @@ -2813,7 +2813,10 @@ function ecwid_check_for_remote_connection_errors()
global $ecwid_oauth;

$results = array();
$results['https_post_error'] = wp_remote_post($ecwid_oauth->get_test_post_url());
$results['https_post_error'] = wp_remote_post(
$ecwid_oauth->get_test_post_url(),
array('timeout' => 20)
);

foreach ($results as $type => $value) {
if (is_wp_error($value)) {
Expand Down
6 changes: 3 additions & 3 deletions includes/class-ecwid-admin-main-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function _do_integrated_admin_page( $page = self::PAGE_HASH_DASHBOARD ) {
return;
}

$result = $request->do_request();
$result = $request->do_request( array( 'timeout' => 20 ) );

if ( @$result['code'] == 403 && (
strpos( $result['data'], 'Token too old' ) !== false
Expand All @@ -133,7 +133,7 @@ public function _do_integrated_admin_page( $page = self::PAGE_HASH_DASHBOARD ) {
Ecwid_Message_Manager::show_message( 'no_oauth' );
return;
}
$result = $request->do_request();
$result = $request->do_request( array( 'timeout' => 20 ) );

if ( $result['code'] == 200 ) {
update_option( 'ecwid_time_correction', time() - $time );
Expand All @@ -143,7 +143,7 @@ public function _do_integrated_admin_page( $page = self::PAGE_HASH_DASHBOARD ) {
$iframe_src = ecwid_get_iframe_src( $time, $page );

$request = Ecwid_Http::create_get( 'embedded_admin_iframe', $iframe_src, array( Ecwid_Http::POLICY_RETURN_VERBOSE ) );
$result = $request->do_request();
$result = $request->do_request( array( 'timeout' => 20 ) );
}//end if

if ( $result['code'] == 403 ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/class-ecwid-admin-storefront-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static function do_page() {
$categories = ecwid_get_categories_for_selector();

$api = new Ecwid_Api_V3();
$res = $api->get_products( array( 'responseFields' => 'total,count,items(id,name)' ) );
$res = $api->get_products( array( 'responseFields' => 'total,count,items(id,name,enabled)' ) );
if ( $res ) {
$products = $res->items;
$products_total = $res->total;
Expand Down
2 changes: 1 addition & 1 deletion includes/class-ecwid-nav-menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public function process_menu_items( $items ) {
$result = $api->get_categories(
array(
'parent' => 0,
'responseFields' => 'total,count,items(id,name,url,nameTranslated,orderBy)',
'responseFields' => 'total,count,items(id,name,url,enabled,nameTranslated,orderBy)',
)
);

Expand Down
13 changes: 11 additions & 2 deletions includes/class-ecwid-oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ public function __construct() {
}

public function test_post() {
$return = EcwidPlatform::http_post_request( $this->get_test_post_url() );
$return = EcwidPlatform::http_post_request(
$this->get_test_post_url(),
array(),
array( 'timeout' => 20 )
);

return is_array( $return );
}
Expand Down Expand Up @@ -116,7 +120,12 @@ public function process_authorization() {
)
);

$return = $request->do_request( array( 'body' => $params ) );
$return = $request->do_request(
array(
'body' => $params,
'timeout' => 20,
)
);

$result = new stdClass();
if ( is_array( $return ) && isset( $return['data'] ) ) {
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Requires at least: 4.4
Tested up to: 6.6
Stable tag: 6.12.15
Stable tag: 6.12.16

Powerful, easy to use ecommerce shopping cart for WordPress. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.

Expand Down Expand Up @@ -153,6 +153,10 @@ You can use Ecwid’s built-in import tools to copy your store products from any
* [Ecwid Help Center](http://help.ecwid.com "Ecwid Help")

== Changelog ==
= 6.12.16 - Jul 16, 2024 =
- Resolved an issue with the store sometimes failing to connect to a plugin.
- Additionally, we've fixed a problem that in some cases caused direct category links to display a 404 Not Found page.

= 6.12.15 - Jul 10, 2024 =
- After the last update, the our ecommerce plugin could cause an issue with urls and an issue with loading the admin area. We have fixed these issues.

Expand Down

0 comments on commit 62617e7

Please sign in to comment.