Just thinking out loud, would this be possible with the WP Password Protection (pages)?
By purchasing a related product (you would have one product for each “game”), the user would get an email and in that email you would communicate the password for the related game (which would be a page).
Then the user can go to that page and see content after inserting the password.
This would likely need some custom coding for the emails after purchasing the product related to the game, and eventually some custom coding for relating the product to the specific game.
(Well, I am quite sure using Toolset you could avoid some of that custom code, but that is as said a paid plugin and for the same price, or a bit more, maybe you could even hire a programmer to do the coding for you, if you do not feel comfortable writing it on your own)
As for an “out of the box” solution I don’t think there is anything out there that does exactly that, since it is a bit particular goal.
1. You could maybe relate the pages to products with a Custom Field that holds the Page (Game) ID, on the product side
2. You could then eventually customise the WooCommerce emails by overriding the templates using some PHP like shown here https://woocommerce.com/posts/how-to-customize-emails-in-woocommerce/ or eventually a plugin like https://woocommerce.com/products/woocommerce-email-customizer/ can help.
I would start testing this by using woocommerce_email_after_order_table or woocommerce_email_before_order_table hooks.
I think the PHP email customisation is being more flexible and you could get the ID of the Page (Game) from the “purchased product”. That would give you the ID of that page and hence you can then get the password for that page using $post = get_post($post_id) and then from the post object accessing the password like so $post->post_password
$post_id would be previously populated from the said Custom Field of the product that holds the ID of the page (game) related to it, like so:
$post_id = get_post_meta($product_id, 'the_field_with_page_id', true)
To get the $product_id itself inside the email, there is some guidance here https://stackoverflow.com/questions/49330876/get-the-product-id-from-email-templates-in-woocommerce-3
As said, I don’t think this will be possible without a line of code, some plugins might help avoid a couple lines but ultimately you will have to write some logic, I think.
I hope this helps!
-
This reply was modified 5 years ago by
Anonymous User 14808221.
-
This reply was modified 5 years ago by
Anonymous User 14808221.
-
This reply was modified 5 years ago by
Anonymous User 14808221.