Skip to content

Instantly share code, notes, and snippets.

@seb86
Created February 2, 2017 15:04
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 seb86/70d8fede3e2d6b1c9fff5f2734a4424a to your computer and use it in GitHub Desktop.
Save seb86/70d8fede3e2d6b1c9fff5f2734a4424a to your computer and use it in GitHub Desktop.
Adds a new subscription position on the checkout before the submit button.
add_filter('mailpoet_woocommerce_subscription_position', 'wc_mp_before_order_button');
function wc_mp_before_order_button( $subscription_positions ) {
$add_subscription_position = array(
'review_order_before_submit' => __('Before Order Submit')
);
// Add the subscription position.
$subscription_positions = array_merge($add_subscription_position, $subscription_positions);
return $subscription_positions;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment