Skip to content

Commit

Permalink
Merge pull request #939 from wpmasters-maksym/2-sell-media-licenses-m…
Browse files Browse the repository at this point in the history
…arkup

#2 - Fixed after adding licenses, the values are not reset
  • Loading branch information
maharzan authored Aug 18, 2022
2 parents ee8e365 + 96da0e7 commit f15a7e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion inc/class-tax-markup.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ function updateSlider(slideAmount) {
}

jQuery(document).ajaxComplete(function( event, xhr, settings ){
jQuery('body.post-type-sell_media_item [name="meta_value[markup]"]').val( '<?php echo esc_js( $initial_markup ); ?>%' );
if( ~settings.data.indexOf('action=add-tag') ) {
jQuery('body.post-type-sell_media_item [name="meta_value[default]"]').prop('checked', false);
jQuery('#slide').val( 0 );
updateSlider( 0 );
}
});
</script>
<div class="sell_media-slider-container">
Expand Down

0 comments on commit f15a7e2

Please sign in to comment.