Files
doitinpoland.com/wp-content/plugins/wpml-translation-management/classes/ICL-20-migration/class-wpml-tm-icl20-migration-ajax.php
2023-09-12 21:41:04 +02:00

29 lines
636 B
PHP

<?php
/**
* @author OnTheGo Systems
*/
class WPML_TM_ICL20_Migration_AJAX extends WPML_TM_AJAX {
/** @var WPML_TM_ICL20_Migration_Progress */
private $progress;
/**
* WPML_TM_ICL20_Migration_AJAX constructor.
*
* @param WPML_TM_ICL20_Migration_Progress $progress
*/
public function __construct( WPML_TM_ICL20_Migration_Progress $progress ) {
$this->progress = $progress;
}
/**
* AJAX callback used to set the user confirmation for starting the migration
*/
public function user_confirmation() {
if ( $this->is_valid_request() ) {
$this->progress->set_user_confirmed();
wp_send_json_success();
}
}
}