Adding a Custom Field to Checkout
The first thing we need to do is add our custom field to the checkout, and this is best achieved by editing the main checkout, but you could use a custom checkout for only posts if you wish
You need to edit your checkout, so navigate to our checkout page. once it loads, add a new custom field. Its placement doesn't actually matter, as we will use CSS to hide it, but I prefer the bottom of the checkout so it's not in my way.
So we need to add a new text field block, and it looks like the image below
We need to call it post_id for a basic setup. (Customisation is achievable, but it's a developer / advanced feature.) This is important as this is the name that the plugin is looking for. It should look like the below. It is recommended that you hide the custom field to prevent unauthorised modifications. Even though access will only be granted if the price ID matches, it pays to be cautious.
- It should always be post_id
- This shouldn't matter, but I would recommend keeping it as post_id
- This class hides the field for us, so it can't be seen
Once this is done, our checkout is ready for working with Post Access Manager Pro For SureCart
The following video shows you the process in action: