{"id":1812,"date":"2024-09-26T13:44:51","date_gmt":"2024-09-26T13:44:51","guid":{"rendered":"http:\/\/docs"},"modified":"2024-09-26T13:44:51","modified_gmt":"2024-09-26T13:44:51","password":"","slug":"useful-filters","status":"publish","type":"docs","link":"https:\/\/www.8theme.com\/documentation\/xstore\/xstore-hooks-filters\/useful-filters\/","title":{"rendered":"Useful Filters"},"content":{"rendered":"<p>Codes from this article should be added into <code class=\"inline-code\">child-theme\/functions.php<\/code> file using FTP.<\/p>\n<p><b>Filter that allows the reversal of the product order in the mini-cart content:<\/b><\/p>\n<p>Filter name: <code class=\"inline-code\">et_mini_cart_reverse<\/code> <\/p>\n<p>Filter usage: <\/p>\n<pre>add_filter(&#39;et_mini_cart_reverse&#39;, &#39;__return_true&#39;);\n<\/pre>\n<p><a href=\"https:\/\/www.8theme.com\/topic\/showing-latest-product-at-the-top-of-the-side-cart-rather-than-bottom\/\" target=\"_blank\" rel=\"noopener\">Topic<\/a><\/p>\n<p><b>Filter that allows to show cart canvas on cart\/checkout pages. By default it is not shown on those pages:<\/b><\/p>\n<p>Filter name: <code class=\"inline-code\">etheme_cart_content_shown_cart_checkout_pages<\/code> <\/p>\n<p>Filter usage: <\/p>\n<pre>add_filter(&#39;etheme_cart_content_shown_cart_checkout_pages&#39;, &#39;__return_true&#39;);\nadd_filter(&#39;woocommerce_widget_cart_is_hidden&#39;, &#39;__return_false&#39;); \/\/ also we need to add filter for default woocommerce because they hide cart widget area on cart\/checkout pages \n<\/pre>\n<p><b>Filter to show full title in prev\/next navigation instead of cropped one by 30 chars:<\/b><\/p>\n<p>Could be useful if user has HTML in title and to prevent bad cropping html chars but showing the full title.<\/p>\n<p>Filter name: <code class=\"inline-code\">etheme_prev_next_title<\/code> <\/p>\n<p>Filter usage: <\/p>\n<pre>add_filter(&#39;etheme_prev_next_title&#39;, function ($title, $full_title) {\nreturn $full_title;\n}, 10, 2);\n<\/pre>\n<p><a href=\"https:\/\/www.8theme.com\/topic\/display-of-special-characters-like-in-product-names\/#post-324940\" target=\"_blank\" rel=\"noopener\">Topic<\/a><\/p>\n<p><b>Filter to show the full title in the sticky cart panel instead of cropped one by 30 chars:<\/b><\/p>\n<p>Could be useful if user has HTML in title and to prevent bad cropping html chars but showing the full title.<\/p>\n<p>Filter name: <code class=\"inline-code\">etheme_sticky_cart_title<\/code> <\/p>\n<p>Filter usage: <\/p>\n<pre>add_filter(&#39;etheme_sticky_cart_title&#39;, function ($title, $full_title) {\nreturn $full_title;\n}, 10, 2);\n<\/pre>\n<p><b>Filter to remove the Shop step from breadcrumbs:<\/b><\/p>\n<p>Filter usage:<\/p>\n<pre>add_filter( &#39;etheme_breadcrumbs_shop_step&#39;, &#39;__return_false&#39;);\n<\/pre>\n<p><a href=\"https:\/\/www.8theme.com\/topic\/remove-shop-page-from-breadcrumbs\/\" target=\"_blank\" rel=\"noopener\">Topic<\/a><\/p>\n<p><b>Filter to change default pre-rendered variations loaded on frontend:<\/b><\/p>\n<p>Filter usage:<\/p>\n<pre>add_filter( &#39;woocommerce_ajax_variation_threshold&#39;, function($limit) {\nreturn 70;\n} );\n<\/pre>\n<p><a href=\"https:\/\/www.8theme.com\/topic\/bug-if-have-more-variations-for-example-50\/#post-319008\" target=\"_blank\" rel=\"noopener\">Topic<\/a><\/p>\n<p><b>Filter to show the Buy now button in the sticky add to cart panel on mobile:<\/b><\/p>\n<p>Filter name: <code class=\"inline-code\">etheme_sticky_add_to_cart_buy_now_hide_mobile<\/code> <\/p>\n<p>Filter usage: <\/p>\n<pre>add_filter(&#39;etheme_sticky_add_to_cart_buy_now_hide_mobile&#39;, &#39;__return_false&#39;);\n<\/pre>\n<p>Info: If someone needs to hide add_to_cart and show buy now there then the filter above will help + CSS code (Theme Options &gt; Theme Custom CSS &gt; Global):<\/p>\n<pre>@media only screen and (max-width: 767px) {\n    .etheme-sticky-cart .add_to_cart_button, .etheme-sticky-cart .et-or-wrapper {\n        display: none;\n    }\n}\n<\/pre>\n<p>to hide add_to_cart + or wrapper in the sticky panel on custom <code class=\"inline-code\">@media<\/code> .<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Codes from this article should be added into child-theme\/functions.php file using FTP. Filter that allows the reversal of the product order in the mini-cart content: Filter name: et_mini_cart_reverse Filter usage: add_filter(&#39;et_mini_cart_reverse&#39;, &#39;__return_true&#39;); Topic Filter that allows to show cart canvas on cart\/checkout pages. By default it is not shown on those pages: Filter name: etheme_cart_content_shown_cart_checkout_pages [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"doc_category":[48],"doc_tag":[],"class_list":["post-1812","docs","type-docs","status-publish","hentry","doc_category-xstore-hooks-filters"],"aioseo_notices":[],"year_month":"2026-04","word_count":368,"total_views":"3712","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"author_nicename":"docs","author_url":"https:\/\/www.8theme.com\/documentation\/author\/docs\/"},"doc_category_info":[{"term_name":"XStore Hooks &amp; Filters","term_url":"https:\/\/www.8theme.com\/documentation\/xstore\/xstore-hooks-filters\/"}],"doc_tag_info":[],"author_list":[{"ID":"1","user_login":"docs","display_name":"docs","id":"1"}],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.8theme.com\/documentation\/wp-json\/wp\/v2\/docs\/1812","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.8theme.com\/documentation\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.8theme.com\/documentation\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.8theme.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.8theme.com\/documentation\/wp-json\/wp\/v2\/comments?post=1812"}],"version-history":[{"count":0,"href":"https:\/\/www.8theme.com\/documentation\/wp-json\/wp\/v2\/docs\/1812\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.8theme.com\/documentation\/wp-json\/wp\/v2\/media?parent=1812"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.8theme.com\/documentation\/wp-json\/wp\/v2\/doc_category?post=1812"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.8theme.com\/documentation\/wp-json\/wp\/v2\/doc_tag?post=1812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}