“add to cart” links css class “ajax_add_to_cart” doesn’t show in woocommerce in widget sidebar

I create woocmmerce widget that will create loop by product category. Product loops result should as much as same woocommerce default content-product.php file. And everything is fine within loop ( attributes, link etc ) except css class. I can’t figure out actually where i messed up, but i guess the main problem is within $defaults variable or in woocommerce_loop_add_to_cart_args filter. Please someone help me.

Unable to parse JSON response from wp_send_json_success

Trying to do this the WordPress way: wp_send_json_success PHP processing save_form return: $response = array( 'messages' => $message ); wp_send_json_success( $response ); jQuery: $j.ajax({ type: 'POST', url: ajax_url, data: { action: 'save_form', form_id: $j('#form_id').val(), full_name: $j('#full_name').val(), email: $j('#email').val(), signup_nonce: $j('#signup_nonce').val() }, success: function (response) { console.log(response.messages); }, error: function (response) { } }); return false; … Read more