Your documentation provides the below code (which goes into Theme > Functions.php) :
global $WPML_Sticky_Links;
if ( method_exists( $WPML_Sticky_Links, 'show_permalinks' ) ) {
add_filter( 'do_shortcode_tag', [ $WPML_Sticky_Links, 'show_permalinks' ], 0 );
}
However, there are cases when I need to disable WPML plugins for debugging. And the issue is that if I disable WPML plugins BUT I keep the above shortcode on my Functions.php, the site crashes.
Therefore, you need to adjust your shortcode so that it avoids crashing the site if WPML plugins are being disabled (because it can happen, like for debugging for instance). So you need to make sure your code detects if WPML plugins are activated or not, if not then the code should not fire itself.
Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in wp-content/themes/THEME/functions.php:3
Stack trace:
#0 wp-content/themes/THEME/functions.php(33): method_exists()
#1 wp-settings.php(591): include('/home/DOMAIN...')
#2 wp-config.php(92): require_once('/home/DOMAIN...')
#3 wp-load.php(50): require_once('/home/DOMAIN...')
#4 wp-admin/admin.php(34): require_once('/home/DOMAIN...')
#5 wp-admin/theme-editor.php(10): require_once('/home/DOMAIN...')
#6 {main}
thrown