Hi Toby,
Although this is not possible with the current options from the plugin, this might be possible with some custom code by using the alg_wc_ev_user_account_activated
hook. For example:
add_action( 'alg_wc_ev_user_account_activated', function ( $user_id, $args ) {
if ( ! $args['directly'] ) {
return;
}
$redirect_url = '';
$order_id = get_order_from_user_id( $user_id );
if (
1 === get_product_type_qty_from_order( 'simple-subscription', $order_id ) ||
1 === get_product_type_qty_from_order( 'variable-subscription', $order_id )
) {
$redirect_url = 'http://redirect-to-url-1.com';
} elseif (
get_product_type_qty_from_order( 'simple-subscription', $order_id ) > 1 ||
get_product_type_qty_from_order( 'variable-subscription', $order_id ) > 1
) {
$redirect_url = 'http://redirect-to-url-2.com';
}
$redirect_url = add_query_arg( array( 'alg_wc_ev_success_activation_message' => 1 ), $redirect_url );
wp_redirect( $redirect_url );
exit;
}, 90, 2 );
Just a note, the get_order_from_user_id()
and get_product_type_qty_from_order()
functions do not exist. I just added it as an example.