wp_remote_post not working with admin-post.php
Thanks to the comment by Sally CJ, it turned out that the issue was that the user was not authenticated when invoking admin-post.php via wp_remote_post. The simplest solution was to ensure that the wp_remote_post had all the current cookies, as follows: $nonce = wp_create_nonce( ‘my-action’ ); foreach ( $_COOKIE as $name => $value ) { … Read more