admin-ajax.php 400 (Bad Request) what am I doing wrong?
You’re declaring the AJAX handler inside the shortcode handler. That’s not going to work: admin AJAX requests aren’t processed in the context of a page, so the shortcode won’t be run, so the handler won’t be set up. You’ll need to move the function definition and add_actions out to the top level, not inside wpcode_elementor_shortcode. … Read more