Hey, sorry for not responding this previously, we were working the new release and decided to respond you later.
While the current version of the plugin does not provide this option in form of a wizard or form, you can surely achieve this using hooks.
First, make sure to add a custom meta field where to store the product prefix, you can use WordPress “Advance Custom Fields” plugin to achieve this without much coding.
Then implement the following hook.
// Hook called before creating license key
add_filter( 'woocommerce_license_key_meta_value', function( $license_key, $item, $product ) {
// Get the product prefix, the following example uses ACF code
$prefix = get_field( 'prefix', $product->get_id() );
// Append prefix to code
$license_key['code'] = $prefix . $license_key['code'];
// Return data
return $license_key;
}, 10, 3 );
-
This reply was modified 6 years, 6 months ago by
10Quality.
-
This reply was modified 6 years, 6 months ago by
10Quality. Reason: Correction done to code shared