Skip to content

Instantly share code, notes, and snippets.

@bentasm1
Last active November 28, 2022 22:15
Show Gist options
  • Save bentasm1/a9b7330d551c1ce8a0bb702ab2ba13f1 to your computer and use it in GitHub Desktop.
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
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