From 60a161aa93264a031f9a61733f49131496292425 Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Tue, 27 Jan 2015 14:14:17 -0800 Subject: [PATCH 1/2] Fix session expired notice on checkout --- includes/class-wc-ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 219bff95909..b2ca9fe29a6 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -187,7 +187,7 @@ class WC_AJAX { if ( 0 == sizeof( WC()->cart->get_cart() ) ) { $data = array( 'fragments' => apply_filters( 'woocommerce_update_order_review_fragments', array( - '.woocommerce-checkout' => '
' . __( 'Sorry, your session has expired.', 'woocommerce' ) . ' ' . __( 'Return to homepage', 'woocommerce' ) . '
' + 'form.woocommerce-checkout' => '
' . __( 'Sorry, your session has expired.', 'woocommerce' ) . ' ' . __( 'Return to homepage', 'woocommerce' ) . '
' ) ) ); From 3a1dc68ff94c5630f9f4e7ddc0bcdb55eb648b9f Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Tue, 27 Jan 2015 14:41:33 -0800 Subject: [PATCH 2/2] Fix typo --- assets/js/frontend/checkout.js | 2 +- includes/class-wc-ajax.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/frontend/checkout.js b/assets/js/frontend/checkout.js index 7409c130eb7..624f1f93911 100644 --- a/assets/js/frontend/checkout.js +++ b/assets/js/frontend/checkout.js @@ -235,7 +235,7 @@ jQuery( function( $ ) { url: wc_checkout_params.ajax_url, data: data, success: function( data ) { - // Always update the fragements + // Always update the fragments if ( data && data.fragments ) { $.each( data.fragments, function ( key, value ) { $( key ).replaceWith( value ); diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index b2ca9fe29a6..c5455d3fe92 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -292,7 +292,7 @@ class WC_AJAX { woocommerce_order_review(); $woocommerce_order_review = ob_get_clean(); - // Get checkout payment fragement + // Get checkout payment fragment ob_start(); woocommerce_checkout_payment(); $woocommerce_checkout_payment = ob_get_clean();