• Resolved astigmatik

    (@astigmatik)


    If I create subscription packages, for instance, with the option to insert only one WooCommerce product, the system works as expected and rightly prevents me from adding a second WooCommerce product.

    However, if I proceed to delete the product I’ve inserted, the subscription package doesn’t reset, and I’m not able to add products even if now I have a total of 0 products.

    The only way to allow post/product insertion is to remove the user’s subscription plan and reassign it. However, this is not an ideal solution. Are there any alternatives?

    • This topic was modified 1 year, 1 month ago by astigmatik.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Saiful Islam

    (@saifislam01)

    Hi @astigmatik,

    It seems like you’re facing an issue with the WP User Frontend plugin in conjunction with WP User Frontend subscription packages. When you delete a product that’s been included in a subscription package, the system doesn’t reset, and you’re unable to add new products, even if you have zero products. Resetting the subscription package is essential, but these settings or options are currently unavailable.

    You can explore custom solutions if you have development skills or access to a developer. You might create a custom script or plugin to reset the subscription package when a product is deleted.

    Hope this information will help.

    Regards!

    Thread Starter astigmatik

    (@astigmatik)

    Thanks for your reply.

    “You can explore custom solutions if you have development skills or access to a developer. You might create a custom script or plugin to reset the subscription package when a product is deleted.”

    This is what I did! I created a PHP snippet that responds to the ‘trashed_post’ event, meaning it will be executed when a post (an article, page, or custom post type) is moved to the trash. Basically the code increases the count of available “products” (or post) in a user’s subscription when they delete one of their type posts.

    Plugin Support Saiful Islam

    (@saifislam01)

    That’s great to hear that you’ve successfully implemented custom code on your website.

    Now, I’m going to mark this topic as resolved. If you have any queries in the future, you can create another thread.

    Have a good day ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Subscription doesn’t reset if I delete post’ is closed to new replies.