WooCommerce Integration Kit / Validations

Hi there,
I’m trying to set this up on the WooCommerce Integration Kit and I have a couple of questions.

  • How can I make a customer to when the Trial Versions ends can put a new activation key and continue to run? I know you were working on some solution.
  • I tryed to set maxed 2 runs for a compiled file. I added on WC a new order, and put the activation code - email-ordernumber - and it worked, and after 2 runs it asks for new activation code, but I if enter the same code as before email-ordernumber I can make it to work again, and after 2 runs, put the code again. Shouldn’t blocks to the same activation code?
  • If I have monthly subscriptions, should be possible to set new activation code. I can’t use WooCommerce and the Online key generator at the same time, can I?

Thank you in advance.

Best regards.

Just give your customer a new key generated manually or with the online key generator in PHP (provided you know PHP).

It won’t do it for you because the integration kit doesn’t perform server-side checks except whether the order is still valid (if you blocked it or not). It could be possible to extend the kit to include a counter that increases each time the customer runs the workbook and block the access. It’s a suggestion we may work on it in the future.

That’s not correct: nothing prevents you from using both. It’s up to you, provided that you know what you want to do with the online key generator. It’s a PHP class to integrate into your own project, not a ready-to-use solution. For such a solution, the WooCommerce Integration Kit is here.

Thanks for answering. Things are getting cleared.
One last thing, please, just to confirm, it checks if the experition date is exceeded right?
For instance, if I define on workbooks.json 30 days for one variation, when passes 30 days after the activation, it will asks for a new activation key right?
Thank you in advance.

Yes, it will ask for a new activation key. You can then block the order manually if you want, or set up a cron job to disable all orders that are more than 30 days old for instance.

Thanks, that’s nice.
At this point, I’m inserting data from the token every time someone enters an activation key, and manually I query my table to check it.
But I blocked the entry of the same System ID on the woocommerce meta field. This means, that the user can’t enter the activation key twice :wink:
That cron job would be massive! You mean making a cron on MainController.php?
Can I retrieve from MainController the experiondate back workbook? :wink:
Thank you so much for your help!

No, with WordPress plugins and the CRON feature available natively in WordPress. Basically, you write a simple plugin that checks the date of each “trial” order in WooCommerce and you change the order status after 30 days for instance. A status different than “complete” will invalidate the activation and the customer won’t be able to access the workbook anymore.

Thanks! I’m doing some search in order to do that.
I’ll try to on the MainController to pass an order experiation date to the meta items of the order, and do the check with that item. If the atual date is “higher” than order experiation date, the xlspadlock_blocked is 1 :wink: Could be like that the cron, right?
Thank you for fantastic input!

I making some changes on the MainController in order to fit my business.
But somehow, it stopped asking for activation code when for instance the 2 maxruns are achieved. This means, that is not checking the validation.
Can you tell me, how does it checks? Because, I’m not seeing on MainController.php.
Thank you in advance. :wink:

EDIT: I got it, it’s because I don’t have a variation on this product. Do I really need? :wink:

No, variations are not mandatory. Just define one and use “0”: the script will use it automatically.