Last active
March 3, 2017 21:59
-
-
Save digitalchild/d3190ab2f72575057b7e7b46a6cb4891 to your computer and use it in GitHub Desktop.
Display a notice if the vendor hasn't connected their stripe account
This file contains 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
<?php | |
// Add this to your themes functions.php this will not work with free only the pro dashboard. | |
add_action( 'wcv_pro_before_dashboard', 'add_stripe_notice' ); | |
function add_stripe_notice( ){ | |
$stripe_token = get_user_meta( get_current_user_id(), '_stripe_connect_access_key' , true ); | |
if ( ! isset( $stripe_token ) ){ | |
echo '<div class="woocommerce-error"><p>Connect your stripe account to accept payments thanks!</p></div>'; | |
} | |
} // add_stripe_notice() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment