
jonas.pedersen@delfi.com(@jonas-pedersen-delfi-com)
20 Posts
Customers
Quote from jonas.pedersen@delfi.com on November 24, 2021, 13:35
Hi In my code snippets plugin, i have a code from you which is making an error:
add_shortcode('woocs_in_menu', function() {
if (defined('WOOCS_LINK')) {
$styles_link = WOOCS_LINK . 'views/shortcodes/styles/for-menu/';
wp_enqueue_style('woocs-style-in-menu', $styles_link . "styles.css", array(), WOOCS_VERSION);
wp_enqueue_script('woocs-style-in-menu', $styles_link . "actions.js", array('jquery'), WOOCS_VERSION);
ob_start();
?>
<span style="cursor: pointer;">Click on me!!</span><br />
<div class="woocs-style-for-menu-dialog" style="display:none; text-align: left; width: 160px;">
<div class="woocs-style-for-menu-title">Select Currency</div>
<div class="woocs-style-for-menu-form"><?php echo do_shortcode('[woocs style=2]') ?></div>
</div>
<?php
return ob_get_clean();
}
});
What is this code for?
Hi In my code snippets plugin, i have a code from you which is making an error:
add_shortcode('woocs_in_menu', function() {
if (defined('WOOCS_LINK')) {
$styles_link = WOOCS_LINK . 'views/shortcodes/styles/for-menu/';
wp_enqueue_style('woocs-style-in-menu', $styles_link ."styles.css", array(), WOOCS_VERSION);
wp_enqueue_script('woocs-style-in-menu', $styles_link ."actions.js", array('jquery'), WOOCS_VERSION);
ob_start();
?>
<span style="cursor: pointer;">Click on me!!</span><br />
<div class="woocs-style-for-menu-dialog" style="display:none; text-align: left; width: 160px;">
<div class="woocs-style-for-menu-title">Select Currency</div>
<div class="woocs-style-for-menu-form"><?php echo do_shortcode('[woocs style=2]') ?></div>
</div>
<?php
return ob_get_clean();
}
});
What is this code for?

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on November 25, 2021, 12:14
Hello
Read this please - https://currency-switcher.com/how-to-drop-woocommerce-currency-switcher-in-menu
Hello
Read this please - https://currency-switcher.com/how-to-drop-woocommerce-currency-switcher-in-menu