Skip to content

Instantly share code, notes, and snippets.

@dancameron
Created October 5, 2012 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dancameron/3842763 to your computer and use it in GitHub Desktop.
Save dancameron/3842763 to your computer and use it in GitHub Desktop.
GBS :: Filter submit_deal for non sponsors
add_action( 'submit_deal', 'redirect_non_sponsor_deal_submission' );
function redirect_non_sponsor_deal_submission( Group_Buying_Deal $deal ) {
if ( is_user_logged_in() && !gb_account_has_merchant( get_current_user_id() ) ) {
$deal_id = $deal->get_ID();
self::redirect_to_merch_registration( $deal_id );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment