Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)

You have not added wp_ajax_nopriv so that is the reason for ajax failure for non-logged in users.

public function register() {
    add_action( 'wp_ajax_tidplus' , array( $this, 'post' ) );
    add_action( 'wp_ajax_nopriv_tidplus' , array( $this, 'post' ) );
}

Please do this change and check.

Leave a Comment

404 Not Found

Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.