Plugin executing shortcode in code sample
-
Hello,
Thank you for developing and maintaining this plugin. We are using this plugin to display some code examples in which we are using a shortcode.
The shortcode used in the example is also of a plugin that is installed on our website. So when this page is loaded the shortcode is being executed and The SyntaxHighlighter plugin is outputting the HTML of what it receives.
You can see the problem highlighted in the example code shown in Step 2 of the article in question.
Is there a way how we can filter / nullify that shortcode in the example code so it is not executed, and instead show the shortcode? That code is supposed to be just 14 lines long, as per the below:
// Add link to tab. function wp_2fa_custom_my_account_label( $items ) { $items['2fa-config'] = '2FA Configuration'; return $items; } add_filter( 'woocommerce_account_menu_items', 'wp_2fa_custom_my_account_label' ); // Add tab content. function wp_2fa_custom_account_content() { echo do_shortcode( '[wp-2fa-setup-form]' ); } add_action( 'woocommerce_account_2fa-config_endpoint', 'wp_2fa_custom_account_content' );
Thank you. Looking forward to hearing from you.
The page I need help with: [log in to see the link]
- The topic ‘Plugin executing shortcode in code sample’ is closed to new replies.