Last active
August 29, 2023 08:29
-
-
Save nayemDevs/603696b63eb5196847c23a8c28a5d6e6 to your computer and use it in GitHub Desktop.
Override seller setup-wizard via child-theme using Class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Dokan_Setup_Wizard_Override extends Dokan_Seller_Setup_Wizard { | |
/** | |
* Introduction step. | |
*/ | |
public function dokan_setup_introduction() { | |
$dashboard_url = dokan_get_navigation_url(); | |
?> | |
<h1><?php esc_attr_e( 'Welcome to the NayemDevs Blog', 'dokan-lite' ); ?></h1> | |
<p><?php echo wp_kses( __( 'Thank you for choosing The Marketplace to power your online store! This quick setup wizard will help you configure the basic settings. <strong>It’s completely optional and shouldn’t take longer than two minutes.</strong>', 'dokan-lite' ), [ 'strong' => [] ] ); ?></p> | |
<p><?php esc_attr_e( 'No time right now? If you don’t want to go through the wizard, you can skip and return to the Store!', 'dokan-lite' ); ?></p> | |
<p class="wc-setup-actions step"> | |
<a href="<?php echo esc_url( $this->get_next_step_link() ); ?>" class="button-primary button button-large button-next lets-go-btn dokan-btn-theme"><?php esc_attr_e( 'Let\'s Go!', 'dokan-lite' ); ?></a> | |
<a href="<?php echo esc_url( $dashboard_url ); ?>" class="button button-large not-right-now-btn dokan-btn-theme"><?php esc_attr_e( 'Not right now', 'dokan-lite' ); ?></a> | |
</p> | |
<?php | |
do_action( 'dokan_seller_wizard_introduction', $this ); | |
} | |
} | |
new Dokan_Setup_Wizard_Override; | |
?> |
Hi,
I also looking for a code to modify the final wizard step...
i founded nothing to achieve that
You have to follow the same code flow but in that case, you have to override the last step function as example - public function dokan_setup_recommended() and then modify your code.
Hi,
Ok it works 👍
class Dokan_Setup_Wizard_Override extends Dokan_Seller_Setup_Wizard {
/**
* Final step.
*/
public function dokan_setup_ready() {
$dashboard_url = dokan_get_navigation_url();
?>
<div class="dokan-setup-done">
<img src="<?php echo esc_url( plugins_url( 'assets/images/dokan-checked.png', DOKAN_FILE ) ); ?>" alt="dokan setup">
<h1><?php esc_html_e( 'Your Store is Ready!', 'dokan-lite' ); ?></h1>
</div>
<div class="dokan-setup-done-content">
<p class="wc-setup-actions step">
<a class="button button-primary dokan-btn-theme" href="<?php echo esc_url( $dashboard_url ); ?>"><?php esc_html_e( 'Go to your Store Dashboard!', 'dokan-lite' ); ?></a>
</p>
<p class="wc-setup-actions step">
<a class="button button-primary dokan-btn-theme" href="<?php echo esc_url( home_url() ); ?>/dashboard/subscription/"><?php esc_html_e( 'Canel', 'dokan-lite' ); ?></a>
</p>
</div>
<?php
do_action( 'dokan_seller_wizard_ready', $this );
}
}
new Dokan_Setup_Wizard_Override;
Thanks,
how to override the Store Step? I want to add district & village in address
How do you manually trigger the seller setup wizard? I want to put a button on the dashboard, in case the seller clicked 'not right now' or maybe the window got closed.
How do you manually trigger the seller setup wizard? I want to put a button on the dashboard, in case the seller clicked 'not right now' or maybe the window got closed.
Visit this url:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to override 2nd and 3rd step?