Skip to content

Instantly share code, notes, and snippets.

@wpserve
Created March 22, 2022 09:34
Show Gist options
  • Save wpserve/739385a57e5fe790277ce0ad72854220 to your computer and use it in GitHub Desktop.
Save wpserve/739385a57e5fe790277ce0ad72854220 to your computer and use it in GitHub Desktop.
Move SEO text to bottom for WooCommerce
<?php
add_action('wp_head', 'wpc_add_filters_seo_description');
function wpc_add_filters_seo_description(){
if( class_exists( 'FilterEverything\Filter\Container' ) ){
$seoFrontEnd = FilterEverything\Filter\Container::instance()->getSeoFrontendService();
$your_new_hook = 'woocommerce_archive_description';
remove_action('woocommerce_after_shop_loop', [ $seoFrontEnd, 'showSeoDescription' ], 5);
add_action( $your_new_hook, [ $seoFrontEnd, 'showSeoDescription' ] );
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment