This plugin let you enable packages based payments for WooCommerce products (Your content). Select products to enable packages based payments. Go to product edit page and add packages for product under Online Course Settings tab.

Now link/restrict any post/page to the packages of this product. Users need to buy these packages to access this post/page. Packages will appear on product page.

If user does not buy an error message will appear on content. When user will buy a package then restriction will be removed and bought packages will be disabled automatically on product page.