Skip to content

Instantly share code, notes, and snippets.

@junenacpil29
Created November 12, 2020 08:06
Show Gist options
  • Save junenacpil29/4fa67e39d86bc03cf024c42b7bf98fc9 to your computer and use it in GitHub Desktop.
Save junenacpil29/4fa67e39d86bc03cf024c42b7bf98fc9 to your computer and use it in GitHub Desktop.
add_filter( 'wcvm_pricing_box_args' , 'change_sign_up_membership_button_label');
function change_sign_up_membership_button_label ($data) {
$checkout_url = wc_get_checkout_url();
$checkout_url = add_query_arg( 'add-to-cart', get_the_ID(), $checkout_url );
$checkout_url = add_query_arg( 'is-membership', 'yes', $checkout_url );
$data['button'] = '<a class="btn button" href="' . $checkout_url . '">' . __( 'Choose your plan', 'wc-vendors-membership' ) . '</a>';
return $data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment