Created
July 30, 2020 05:43
-
-
Save marcusig/455eacc5794853d45067b21c0d141232 to your computer and use it in GitHub Desktop.
How to change the "My designs" link in the Save my designs add-on
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 | |
add_action( 'init', function () { | |
// Check that both plugins are active | |
if ( class_exists( 'MKL\PC\Plugin' ) && MKL\PC\Plugin::instance()->get_extension( 'save-your-design' ) ) { | |
// Remove the current text | |
remove_action( 'mkl_pc_frontend_configurator_footer_section_right_before', array( MKL\PC\Plugin::instance()->get_extension( 'save-your-design' )->product, 'add_configurator_button' ) ); | |
// Replace it with the nex text | |
add_action( 'mkl_pc_frontend_configurator_footer_section_right_before', function() { | |
?> | |
<span class="save-your-design-modal-container"><a href="#" class="save-your-design"> (no icon) <span>Saved design</span></a></span> | |
<?php | |
} ); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment