Hello, Greetings for the day.
You want to setup the LMS website using Moodle and wordpress.
A user will visit the worpdres website first, there he will select the course and do the purchasing, after successful purchasing, the user will receive the access details for moodle to start the courses.
Also you want to setup the single sign on, so user from wordpress can log in into the moodle.
Connect with me so we can discuss further, thanks