Merge pull request #7224 from thenbrent/fix_session_expired_notice

[2.3] Fix session expired notice on checkout
This commit is contained in:
Claudio Sanches 2015-01-27 21:34:16 -02:00
commit 7bc853c452
2 changed files with 3 additions and 3 deletions

View File

@ -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 );

View File

@ -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' => '<div class="woocommerce-error">' . __( 'Sorry, your session has expired.', 'woocommerce' ) . ' <a href="' . home_url() . '" class="wc-backward">' . __( 'Return to homepage', 'woocommerce' ) . '</a></div>'
'form.woocommerce-checkout' => '<div class="woocommerce-error">' . __( 'Sorry, your session has expired.', 'woocommerce' ) . ' <a href="' . home_url() . '" class="wc-backward">' . __( 'Return to homepage', 'woocommerce' ) . '</a></div>'
) )
);
@ -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();