WC_Product_CSV_Importer_Controller::get_next_step_link() public WC 1.0
Get the URL for the next step's screen.
{} Это метод класса: WC_Product_CSV_Importer_Controller{}
Хуков нет.
Возвращает
Строку. URL for next step if a next step exists. Admin URL if it's the last step. Empty string on failure.
Использование
$WC_Product_CSV_Importer_Controller = new WC_Product_CSV_Importer_Controller(); $WC_Product_CSV_Importer_Controller->get_next_step_link( $step );
- $step(строка)
- slug (default: current step).
Код WC_Product_CSV_Importer_Controller::get_next_step_link() WC Product CSV Importer Controller::get next step link WC 5.0.0
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 );
}