By woocommerce-sl, on , posted on March 28, 2018

Licence Keys is a reliable tool to maintain control over code install, maintenance and update. As default, on key activation, a unique client id ( usually the domain name) is assigned to the key. This is being used further to allow API interaction like updates.
(more…)

Read more

By woocommerce-sl, on , posted on March 7, 2018

Licensing expiration can be applied to any license created with WP Software License for WooCommerce. Setting up expirations is straightforward — full instructions are available in the documentation: Create expiration for license product. An expiration defines a time-range during which a license key is valid; after the configured end date the key will be taken offline and will no longer validate or accept new activations. This makes expirations ideal for trials, limited-time promotions, beta programs or time-boxed support contracts. (more…)

Read more

By woocommerce-sl, on , posted on August 30, 2017

Use a Predefined Key Multiple Times for Different Customers

WooCommerce Software License lets you manage and distribute license keys with ease. Normally, each key is unique and issued once. However, there are scenarios—such as beta testing or bulk giveaways—where you want the same key to be assigned multiple times. Thanks to our Predefined Keys feature and a simple “dynamic tag” syntax, you can control exactly how many times a single key is used before it’s retired.

(more…)

Read more

By woocommerce-sl, on , , posted on August 2, 2017

By default, whenever a client purchases a licensed product, a single key is generated and saved within the account. This can be changed through the filter woo_sl/generate_licence_keys_count. Multiple keys can be generated in a row, or none.

The example bellow change the default single key generator to all allowed for current licence group:

add_action('woo_sl/generate_licence_keys_count', 'woo_sl_generate_licence_keys_count', 10,  4);
    function woo_sl_generate_licence_keys_count($generate_keys_count, $order_id, $order_item_id, $license_group_id)
        {
            global $WOO_SL_API;
            
            $_woo_sl    =   $WOO_SL_API->functions->get_order_item_meta($order_item_id,  '_woo_sl',  TRUE);
            
            $group_max_allowed_keys     =   $_woo_sl['max_keys'][$license_group_id];
            
            return $group_max_allowed_keys;   
        }

If the order contain multiple quantity of an item, the user will be able to generate a maximum_group_licence_keys multiplied with quantity. So accordingly the code become something like this:

add_action('woo_sl/generate_licence_keys_count', 'woo_sl_generate_licence_keys_count', 10,  4);
    function woo_sl_generate_licence_keys_count($generate_keys_count, $order_id, $order_item_id, $license_group_id)
        {
            global $WOO_SL_API;
            
            $_woo_sl    =   $WOO_SL_API->functions->get_order_item_meta($order_item_id,  '_woo_sl',  TRUE);
            
            $group_max_allowed_keys     =   $_woo_sl['max_keys'][$license_group_id];

            $order_data         = new WC_Order($order_id);
            $order_products     = $order_data->get_items();

            $order_item_data    = $order_products[$order_item_id];
            $quantity           = $order_item_data['qty'];
            
            return ($quantity * $group_max_allowed_keys);
        }

Read more

By woocommerce-sl, on , posted on August 1, 2017

As default the WP Software License plugin output a ‘X domains per key’ within the order page, client and admin e-mails, my account areas etc. This is because is presumed the purchasable is being linked to a domain (e.g. a downloadable software).

But this is not necessarily to say that way, arbitrary texts can be used depending on the Product type and profile. (more…)

Read more

By woocommerce-sl, on , posted on August 1, 2017

Assigning license groups to variation products in WooCommerce is a powerful feature of the WP Software License plugin. This functionality provides enhanced flexibility and control over licensing management, allowing businesses to tailor licensing options for individual product variation. (more…)

Read more

By woocommerce-sl, on , posted on August 1, 2017

Name
woo_sl/generate_license_key

Type
Filter

Arguments
(text) $license_key
(int) $order_id
(int) $order_item_id
(int) $license_group_id (more…)

Read more