Sort out variation loading after attribute save

This commit is contained in:
Mike Jolley 2015-09-04 14:00:39 +01:00
parent b111331686
commit 32a2bbfbd1
2 changed files with 9 additions and 4 deletions

View File

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