woocommerce pay read:
Can woocommerce realize the function of reading after payment? The native function of woocommerce is only the sale of virtual goods, which is the function of downloading after payment.
The paid reading function woocommerce itself does not have this function.
But woocommerce mall integrates shopping carts, orders, etc., and the realization of paid reading is very simple.
We have created a short code for this plug-in, and output the content that needs to be paid to read through the short code, which is very simple and convenient.
The plugin itself has only one file, because the function is very simple, you can also directly copy the PHP code in the plugin to your theme function, you can use it directly without installing the plugin.
The plugin supports all versions of wordpress and all versions of woocommerce.
The paid purchase principle of this plugin is:
You need to purchase specific goods and complete the transaction before you can see the paid and visible content.
Therefore, you need to first create a woocommerce product, the created product is a single product, check the virtual product (no delivery)
After the creation is complete, go to the background-product to check the ID of this product:
For example, the product ID is 210
Now using shortcodes, shortcodes can be used anywhere, any article, any page, any product of yours, as long as it supports WordPress shortcodes:
The short code is as follows：
Notes on wc_pay_can_read shortcode:
id is the id of the specific product we remembered just now. As long as the user purchases this product, he can see the hidden content (required)
title is the hidden title, which will be displayed above the hidden content, you can enter “paid content:” (optional)
Tishi is a prompt seen by users without permission. You can add a link to connect to a specific product page for users to purchase (required)
First create a virtual product with a price of 20 dollars, and then check the product ID in the background, assuming it is 210. Then put the following code somewhere in the article that you want customers to read after paying. The content in the code is the content that can be read after payment。
Download Link(Visible to members)
[wc_pay_can_read id=’2026,2029,2030′ tishi=’You do not have permission to read this content, click here to become a member and refresh this page to read it’]