How Can We Help?
Hooks for Pay For Post with WooCommerce
Currently the free version of the plugin does not have any hooks built into it. If you have any feature requests where you think a hook would be beneficial please post a feature request and I will see what I can do to incorporate them in.
wc_pay_per_post_before_my_account_shortcode PREMIUM ONLY
This action allows you to hook into BEFORE the shortcode is displayed on the my account page
Example:
add_action( 'wc_pay_per_post_before_my_account_shortcode', function () { echo 'To access your purchased content by clicking links below'; } );
wc_pay_per_post_after_my_account_shortcode PREMIUM ONLY
This action allows you to hook into AFTER the shortcode is displayed on the my account page
Example:
add_action( 'wc_pay_per_post_after_my_account_shortcode', function () { echo 'Thank you for purchasing! Here is a coupon for 10% off your next order.'; } );
wc_pay_per_post_page_view_threshold_reached PREMIUM ONLY
This action allows you to hook into the page view tracking, to perform some action when the user has reached 3 page views remaining. You can use the filter wc_pay_per_post_page_view_action_threshold to change that number to whatever you want.
Example:
add_action( 'wc_pay_per_post_page_view_action_threshold', function () { //Perform whatever function you would like. //ie. Send email to user saying they have 3 page views remaining. } );