add-ons: add the slug from the WooCommerce provider to the automatically generated SKU

I would like to rewrite the SKUs generated by the SKU generator of the WooCommerce product and place them as a prefix with the vendor seal of the WooCommerce product providers in the following format: [Vendor Slug][Generated SKU]. E.g. & # 39; GT1234 & # 39 ;, & # 39; JD1235 & # 39 ;, etc … If the product's author is not a supplier or the order is not associated with a provider, the prefix must be predetermined to & # 39; XX & # 39;

The main difficulty for me is to recover the bullet from the provider for the user who adds the new product. How will I do that? Anything that helps me is appreciated!

filter_wc_sku_generator_sku function ($ product_sku, $ product) {

$ vendor_slug = & # 39; ??? & # 39;
yes (! $ vendor_slug) {
$ product_sku = & # 39; XX & # 39 ;. $ product_sku;
} else {
$ product_sku = $ vendor_slug. $ product_sku;
}
returns $ product_sku;
};
add_filter (& # 39; wc_sku_generator_sku & # 39 ;, & # 39; filter_wc_sku_generator_sku & # 39 ;, 10, 2);