tmcmn
Forum Replies Created
-
I thought _wpnonce would be required too, but it seems to be updating the view count even in a different browser and in incognito mode without that parameter. SveliteKit doesn’t add anything to the request. Maybe it’s an issue with one of my plugins or WordPress settings 🤷
- This reply was modified 2 years, 6 months ago by tmcmn.
Oh great, thanks for the quick reply! I looked at the support topic you linked to.
Running the following Javascript code in SvelteKit’s onMount function triggers a page view for me 😊:
await fetch(https://www.example.com/info/wp-json/wordpress-popular-posts/v1/popular-posts?wpp_id=${$page.params.id},{ method: "POST" });Are the parameters _wpnonce, sampling, and sampling_rate optional then? I wouldn’t know how to generate a WordPress Nonce from a headless site in Javascript. But it seems to be working without those parameters anyways.
Thanks!
- This reply was modified 2 years, 6 months ago by tmcmn.
Forum: Plugins
In reply to: [Pay For Post with WooCommerce] Purchased content count?Yep, @mattpramschufer that’s what I was looking for. Something like the WooCommerce function
wc_get_customer_order_count, but for Pay for Post purchased content.Thanks for considering it for future development.
Cheers