WC_Product_CSV_Importer_Controller::get_next_step_link( string $step = '' )
Get the URL for the next step’s screen.
Description Description
Parameters Parameters
- $step
-
(Optional) slug (default: current step).
Default value: ''
Return Return
(string) URL for next step if a next step exists. Admin URL if it's the last step. Empty string on failure.
Source Source
File: includes/admin/importers/class-wc-product-csv-importer-controller.php
public function get_next_step_link( $step = '' ) { if ( ! $step ) { $step = $this->step; } $keys = array_keys( $this->steps ); if ( end( $keys ) === $step ) { return admin_url(); } $step_index = array_search( $step, $keys, true ); if ( false === $step_index ) { return ''; } $params = array( 'step' => $keys[ $step_index + 1 ], 'file' => str_replace( DIRECTORY_SEPARATOR, '/', $this->file ), 'delimiter' => $this->delimiter, 'update_existing' => $this->update_existing, 'map_preferences' => $this->map_preferences, '_wpnonce' => wp_create_nonce( 'woocommerce-csv-importer' ), // wp_nonce_url() escapes & to & breaking redirects. ); return add_query_arg( $params ); }