get_flow_id();
$step_id = $wcf_step->get_step_id();
echo '';
echo '';
}
}
/**
* Redirect to flow next step.
*
* @param string $redirect_url next step URL.
* @param string $product Product adding in cart.
*/
public function redirect_to_next_flow_step( $redirect_url, $product ) {
if ( isset( $_REQUEST['wcf-step-id'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
$step_id = intval( $_REQUEST['wcf-step-id'] ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended
$wcf_step_obj = wcf_get_step( $step_id );
$next_step_id = $wcf_step_obj->get_direct_next_step_id();
if ( $next_step_id ) {
$redirect_url = add_query_arg(
array(
'cf-redirect' => true,
),
get_permalink( $next_step_id )
);
wc_clear_notices();
}
}
return $redirect_url;
}
}
/**
* Kicking this off by calling 'get_instance()' method
*/
Cartflows_Wd_Flow_Actions::get_instance();