Skip to content

Instantly share code, notes, and snippets.

@marcusig
Created July 30, 2020 05:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcusig/455eacc5794853d45067b21c0d141232 to your computer and use it in GitHub Desktop.
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
<?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