plugin development – Update the WooCommerce Subscription Gateway

A developer has created a plug-in for a new payment gateway, but he has not integrated the functionality to import old data. I wrote a script to update the payment tokens via SQL to add the new token, but I find that some of the tokens of our current payment gateway are not listed in the payment_tokens table, which makes most queries useless. If I update the meta_key _payment_method and _payment_method_title in the postmeta table with the appropriate values ​​for the new payment gateway and add the token to the one existing in the payment_tokens table, the subscription will be renewed with the new payment gateway. Only the problem is that all these tokens are not stored in the payment_tokens table. I thought that building queries would be the fastest method for this import, but I'm starting to think that creating a plugin would be the fastest method. If anyone could point me in the right direction, it would be wonderful.