Skip to content

Instantly share code, notes, and snippets.

@carlosonweb
Created December 14, 2018 03:04
Show Gist options
  • Save carlosonweb/d955f211fbf7ddeba52e3a5ede53deec to your computer and use it in GitHub Desktop.
Save carlosonweb/d955f211fbf7ddeba52e3a5ede53deec to your computer and use it in GitHub Desktop.
Move the WooCommerce Notices on the Beaver Themer Singular Product Layout to Anywhere on the layout via a Custom Shortcode
/**
* First, remove WooCommerce Notices box from its default location on the page (somewhere at the top).
*/
remove_filter( 'fl_theme_builder_before_render_content', 'FLThemeBuilderWooCommerceSingular::before_render_content' );
/**
* Create this shortcode : [fl_woocommerce_notices]
* You can embed this anywhere on the Themer Layout via the HTML module.
*/
add_shortcode( 'fl_woocommerce_notices', function() {
ob_start();
if ( function_exists('wc_print_notices') ) {
?>
<div class="fl-theme-builder-woo-notices fl-row fl-row-fixed-width">
<?php wc_print_notices(); ?>
</div>
<?php
}
return ob_get_clean();
});
@edellingham
Copy link

Looks like more troubleshooting for me then. I appreciate the quick response and update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment