Sorry to disturb you, I remove_action from your Order Class and add_action on another hook,
Hello @sebastienserre
thank you for your message and for using my plugin.
The plugin is not yet integrated into WooCommerce Subscriptions, so it probably won’t work out of the box without some tweaks. You seem to already have figured it out though.
Could you please post your changes here so that other users, who have the same problem, can fix it themselves as well?
of course, I added
<?php
use LicenseManagerForWooCommerce\Integrations\WooCommerce\Order;
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly.
if ( class_exists( 'WC_Subscriptions' ) ){
$order = new Order();
remove_action( 'woocommerce_order_status_completed', array( $order , 'generateOrderLicenses' ) );
add_action( 'woocommerce_order_status_processing', array( $order, 'generateOrderLicenses' ) );
}
on a custom plugin but I think, it can be added to the functions.php of a theme