Merge remote-tracking branch 'origin/master'

This commit is contained in:
Mike Jolley 2015-12-04 12:06:00 +00:00
commit 398cde4770
3 changed files with 8 additions and 7 deletions

View File

@ -271,6 +271,12 @@ jQuery( function( $ ) {
url: wc_checkout_params.wc_ajax_url.toString().replace( '%%endpoint%%', 'update_order_review' ),
data: data,
success: function( data ) {
// Reload the page if requested
if ( 'true' === data.reload ) {
window.location.reload();
return;
}
// Always update the fragments
if ( data && data.fragments ) {
$.each( data.fragments, function ( key, value ) {
@ -284,11 +290,6 @@ jQuery( function( $ ) {
var $form = $( 'form.checkout' );
if ( 'true' === data.reload ) {
window.location.reload();
return;
}
$( '.woocommerce-error, .woocommerce-message' ).remove();
// Add new errors

File diff suppressed because one or more lines are too long

View File

@ -453,7 +453,7 @@ class WC_Product {
* @return bool
*/
public function is_virtual() {
return $this->virtual == 'yes' ? true : false;
return apply_filters( 'woocommerce_is_virtual', $this->virtual == 'yes' ? true : false, $this );
}
/**