Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
398cde4770
|
@ -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
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue