Set paid date when order completed

Job ID: 37942331

Budget: $10 – $30 USD

I have a custom payment gateway. Its working fine but the "Paid date" is not being stored when the order status changes to completed when a payment is finished.

I want that when order status change to completed, it store the date paid in the default woocommerce field.
Related categories: PHP WordPress MySQL HTML WooCommerce