Discover in this tutorial how to export billing data collected in Restrict Content Pro checkout using code, without plugins.
In a previous tutorial you learned how to add the billing fields to the Restrict Content Pro checkout.
In this case, I’m going to tell you how you can export this data to a CSV using Restrict Content Pro’s native tool. This is something very useful that can help you to manage the fiscal part.
To access the Restrict Content Pro export tool you have to go to: Restrict > Tools > Export:
There it gives you the option to export membership or payment data to a CSV file.
Let’s see how you can add customer billing data to this:
Snippet to allow billing data to be exported from Restrict Content Pro
Add the following code at the end of functions.php or in your functionality plugin:
To see this and another 1097 code snippets of this website, login or subscribe here.
With the first code block you add the new columns you want to be exported (address, city…) and with the next 2 blocks you get the billing data for each customer to be added when exporting memberships or payments.
So, if you only use the export of memberships you can use this code:
To see this and another 1097 code snippets of this website, login or subscribe here.
Conclusion
Now you know how to export the billing data collected in the Restrict Content Pro checkout, with a simple code snippet.
If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.
Benefits of being a subscriber. 🙂