Last active
November 28, 2022 22:15
-
-
Save bentasm1/a9b7330d551c1ce8a0bb702ab2ba13f1 to your computer and use it in GitHub Desktop.
WC Vendors - Stripe Gateway & Commissions - Tell admin in user edit if vendor connected to stripe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('_wcv_admin_before_store_commission', 'custom_wcv_admin_before_store_commission'); | |
function custom_wcv_admin_before_store_commission(){ | |
$user_id = $_GET['user_id']; // On the WordPress user edit screen, this will get the user id of the account you are currently editing. | |
$key = get_user_meta( $user_id, '_stripe_connect_access_key', true ); | |
if ( empty( $key ) ) { | |
echo '<h2>This vendor is NOT connected to Stripe.</h2>'; | |
} else { | |
echo '<h2>This vendor is connected to Stripe. Yay!</h2>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment