Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Move the Save your design button to the sidebar
<?php
// Hook before the templates are included
add_action( 'mkl_pc_frontend_templates_before', function() {
// Get the SYD instance
$save_your_design = mkl_pc()->get_extension( 'save-your-design' );
if ( ! $save_your_design ) return;
// Remove the original button
remove_action( 'mkl_pc_frontend_configurator_footer_section_right_before', array( $save_your_design->product, 'add_configurator_button' ), 20 );
// Add the original button in the toolbar instead
add_action( 'mkl_pc_frontend_configurator_toolbar', array( $save_your_design->product, 'add_configurator_button' ), 20 );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment