Sort out variation loading after attribute save
This commit is contained in:
parent
b111331686
commit
32a2bbfbd1
|
@ -404,7 +404,7 @@ jQuery( function( $ ) {
|
|||
// Save attributes and update variations
|
||||
$( '.save_attributes' ).on( 'click', function() {
|
||||
|
||||
$( '.product_attributes' ).block({
|
||||
$( '#woocommerce-product-data' ).block({
|
||||
message: null,
|
||||
overlayCSS: {
|
||||
background: '#fff',
|
||||
|
@ -421,8 +421,13 @@ jQuery( function( $ ) {
|
|||
|
||||
$.post( woocommerce_admin_meta_boxes.ajax_url, data, function() {
|
||||
// Reload variations panel
|
||||
var this_page = window.location.toString();
|
||||
this_page = this_page.replace( 'post-new.php?', 'post.php?post=' + woocommerce_admin_meta_boxes.post_id + '&action=edit&' );
|
||||
|
||||
// Load variations panel
|
||||
$( '#variable_product_options' ).load( this_page + ' #variable_product_options_inner', function() {
|
||||
$( '#variable_product_options' ).trigger( 'reload' );
|
||||
$( '.product_attributes' ).unblock();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue