diff --git a/includes/Admin/SetupWizard.php b/includes/Admin/SetupWizard.php
index 800c02ada4..b664636271 100644
--- a/includes/Admin/SetupWizard.php
+++ b/includes/Admin/SetupWizard.php
@@ -11,9 +11,11 @@
*/
class SetupWizard {
- /** @var string Currenct Step */
- protected $step = '';
+ /** @var string Current Step */
+ protected string $current_step = '';
+ /** @var string custom logo url of the theme */
+ protected $custom_logo = '';
/** @var array Steps for the setup wizard */
protected $steps = [];
@@ -266,10 +268,10 @@ public function setup_wizard() {
unset( $this->steps['recommended'] );
}
- $this->step = current( array_keys( $this->steps ) );
+ $this->current_step = current( array_keys( $this->steps ) );
// get step from url
if ( isset( $_GET['_admin_sw_nonce'], $_GET['step'] ) && wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_admin_sw_nonce'] ) ), 'dokan_admin_setup_wizard_nonce' ) ) {
- $this->step = sanitize_key( wp_unslash( $_GET['step'] ) );
+ $this->current_step = sanitize_key( wp_unslash( $_GET['step'] ) );
}
$this->enqueue_scripts();
@@ -278,8 +280,8 @@ public function setup_wizard() {
isset( $_POST['_wpnonce'], $_POST['save_step'] )
&& wp_verify_nonce( sanitize_key( wp_unslash( $_POST['_wpnonce'] ) ), 'dokan-setup' )
&& ! empty( $_POST['save_step'] )
- && isset( $this->steps[ $this->step ]['handler'] ) ) {
- call_user_func_array( $this->steps[ $this->step ]['handler'], [ $this ] );
+ && isset( $this->steps[ $this->current_step ]['handler'] ) ) {
+ call_user_func_array( $this->steps[ $this->current_step ]['handler'], [ $this ] );
}
ob_start();
@@ -292,7 +294,7 @@ public function get_next_step_link() {
return add_query_arg(
[
- 'step' => $keys[ array_search( $this->step, array_keys( $this->steps ), true ) + 1 ],
+ 'step' => $keys[ array_search( $this->current_step, array_keys( $this->steps ), true ) + 1 ],
'_admin_sw_nonce' => wp_create_nonce( 'dokan_admin_setup_wizard_nonce' ),
]
);
@@ -310,10 +312,14 @@ public function setup_wizard_header() {
-
-
-
-
+
- step ) : ?>
+ current_step ) : ?>
@@ -347,9 +353,9 @@ public function setup_wizard_steps() {
$step ) : ?>
';
- call_user_func( $this->steps[ $this->step ]['view'] );
+ call_user_func( $this->steps[ $this->current_step ]['view'] );
echo '';
}
@@ -500,7 +506,7 @@ public function dokan_setup_selling() {
/**
* Commission step.
*
- * @since 3.14.0
+ * @since DOKAN_SINCE
*
* @return void
*/
@@ -547,7 +553,7 @@ public function dokan_setup_selling_save() {
/**
* Save commission options.
*
- * @since 3.14.0
+ * @since DOKAN_SINCE
*
* @return void
*/
@@ -831,12 +837,12 @@ public function dokan_setup_withdraw_save() {
$options['withdraw_methods'] = ! empty( $_POST['withdraw_methods'] ) ? wc_clean( wp_unslash( $_POST['withdraw_methods'] ) ) : [];
$options['withdraw_order_status'] = ! empty( $_POST['withdraw_order_status'] ) ? wc_clean( wp_unslash( $_POST['withdraw_order_status'] ) ) : [];
- if ( ! empty( $_POST['withdraw_limit'] ) ) {
- $input_limit = sanitize_text_field( wp_unslash( $_POST['withdraw_limit'] ) );
- $options['withdraw_limit'] = is_numeric( $input_limit ) && $input_limit >= 0 ? wc_format_decimal( $input_limit ) : 0;
- } else {
- $options['withdraw_limit'] = 0;
- }
+ if ( ! empty( $_POST['withdraw_limit'] ) ) {
+ $input_limit = sanitize_text_field( wp_unslash( $_POST['withdraw_limit'] ) );
+ $options['withdraw_limit'] = is_numeric( $input_limit ) && $input_limit >= 0 ? wc_format_decimal( $input_limit ) : 0;
+ } else {
+ $options['withdraw_limit'] = 0;
+ }
/**
* Filter dokan_withdraw options before saving in setup wizard
diff --git a/includes/Admin/SetupWizardNoWC.php b/includes/Admin/SetupWizardNoWC.php
index 3c15210fe9..50816728ba 100644
--- a/includes/Admin/SetupWizardNoWC.php
+++ b/includes/Admin/SetupWizardNoWC.php
@@ -73,13 +73,13 @@ protected function set_setup_wizard_template() {
* @return void
*/
public function setup_wizard_content() {
- if ( empty( $this->steps[ $this->step ]['view'] ) ) {
+ if ( empty( $this->steps[ $this->current_step ]['view'] ) ) {
wp_safe_redirect( esc_url_raw( add_query_arg( 'step', 'install_woocommerce' ) ) );
exit;
}
echo '';
- call_user_func( $this->steps[ $this->step ]['view'] );
+ call_user_func( $this->steps[ $this->current_step ]['view'] );
echo '
';
}
@@ -92,8 +92,8 @@ public function setup_wizard_content() {
*/
public function setup_wizard_footer() {
?>
-
-