Forcing the configurator scripts to load

When using a shortcode, there are changes that the configurator scripts aren’t loaded, because the shortcode might not be detected.

In order to force the scripts to load, 2 solutions are possible.

1. Using a PHP hook

add_filter( 'load_configurator_on_page', 'myprefix_load_configurator_on_page' );
function myprefix_load_configurator_on_page( $load_on_page ) {
  // maybe add your conditions here to return true or $load_on_page.
  // Returning true without other conditions will load the scripts everywhere
  return true;

2. Using a custom field

Add a custom field with the name mkl_load_configurator_on_page and value 1 (or anything other than 0) to load the scripts on a specific page

Was this page helpful?
Leave a Reply