- June 14, 2019 at 14:39 #40075ebeautyplanet
We’re using MyCred to sell services like jobs opportunities, publishing articles, publishing ads, etc.
We saw that your plugin blocks content for custom post types. But what we need is to sell the ‘publish’ or ‘upload’ a new post, job, etc. Not the content itself.
So, we made a specific page for the ‘new ad’ form, and set it a credit price. But the problem we see with this, is that once the user ‘buy’ with the credits, he can upload as many ads as he/she wants. And the only way to filter this is to set an ‘expiration date’ on the purchase. Is there a hook or something to only allow one post to the user to publish, and then when he does, ask for the payment again?June 19, 2019 at 15:06 #40256
There is a hook in myCRED that allows you to deduct points for post publishing.
Cordially, M.December 24, 2019 at 11:35 #47911Rafael MotorsPlace
I have exactly the same problem. I need purchased content to be displayed only once per purchase. How to solve it?
RafaelDecember 28, 2019 at 18:36 #48857
This is not the same problem, they were trying to make their users pay for each publication (publish once per payment). While you are trying to make your users pay for each view (view content once per payment).
In your case there could be some issues with your users if they have a bad or spotty internet connection. In your case, it’s better to set a time limit (expiration period) for viewing the content after payment, which is what they intially did but wasn’t very adapted to their situation.
Cordially, M.January 30, 2020 at 03:10 #52485Rafael MotorsPlace
Thanks for answering!
I followed the suggestion and changed the expiration time. However, I managed to change it to just 1 minute. I would like to switch to 1 second, but I can’t.
I followed the guidelines of this link: https://wordpress.org/support/topic/sell-content-expiration-time/
However, when I replace “MINUTE_IN_SECONDS” with “MONTH_IN_SECONDS”, an error occurs when loading the page. In addition, I believe this would be to change it to a month, not a second, as it is in the instruction on that link.
I figured if I replaced it with “SECOND_IN_SECONDS”, it would work, but there is also an error in loading.
One minute to expire is still a lot for me. How should I do?
Rafael.January 30, 2020 at 18:04 #52524
Those all caps strings are just shortcuts (constants) to avoid calculating the number of seconds in a given period of time. For example, HOUR_IN_SECONDS is equal to 3600 and MINUTE_IN_SECONDS is equal to 60.
I didn’t read through the linked solution but from the top of my head, I would suggest trying to replace that string with the number 1 for one second or maybe 3 for three seconds…
Let me know how that works out.
Cordially, M.January 31, 2020 at 02:44 #52535Rafael MotorsPlace
Thank you. Your plugin solved a big problem with my site. Soon I will buy adds.
RafaelJanuary 31, 2020 at 05:28 #52539
You are welcome. 🙂
But for your information, I am not part of the myCRED team, I am just a third-party developer and a fellow user just like you.
Anyway, if you need something else, you can let me know.
Have a nice day and good luck with your project. 😉
You must be logged in to reply to this topic.