I have added Custom Post Fields (a list of check-boxes) to the Custom Taxonomy 'product_cat'.
Also I have a drop-down with this Custom Taxtonimies ('product_cat') on my Custom Post Type ('product') Add/Edit page.
How I can get a metadata from these Custom Fields with using jQuery when the Custom Taxonomy drop-down was changed?
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#prodcatoptions').change(function() {
var productsubcut = jQuery('#prodcatoptions').val();
if ( productsubcut == '') {
} else {
var data = {
/* I don't know what I need to type here */
};
jQuery.post(ajaxurl, data, function(response){
console.log(response);
});
}
});
});
</script>