How to Display Out of Stock Products Last
-
I would like to display out of stock products last for product archives, search results, and pages. I would like to do this without compromising the original order-by query. For example, if a customer orders by “popularity,” I would like it to order by most popular then add the out of stock products at the end.
- This topic was modified 2 years, 5 months ago by budddwyer.
The page I need help with: [log in to see the link]
-
Hello,
You can refer to this thread to get more information:
https://www.ads-software.com/support/topic/sort-the-products-in-out-of-stock-at-the-end-of-the-page-2/Let us know if that worked for you.
That didn’t work for me. It gives me PHP errors.
Hello @budddwyer!
That didn’t work for me. It gives me PHP errors.
I just added the code mentioned on that thread to my test site’s functions.php file by using the the Code Snippets plugin and found it is working properly.
Can you please share a screenshot of the error you get?
We recommend https://snipboard.io for easily sharing screenshots – please follow the instructions on that page, then paste the URL in this thread.Hello,
Thanks for sharing the screenshot, for us to take a closer look you can provide the following information:
— Share a copy of your site’s System Status: You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.?
— Share a copy of any fatal error log found under WooCommerce > System Status > Logs (if any).
Thanks.
### WordPress Environment ### WordPress address (URL): https://d8superstore.com Site address (URL): https://d8superstore.com WC Version: 6.6.1 REST API Version: ? 6.6.1 WC Blocks Version: ? 7.6.2 Action Scheduler Version: ? 3.4.0 Log Directory Writable: ? WP Version: 6.0 WP Multisite: – WP Memory Limit: 4 GB WP Debug Mode: ? WP Cron: ? Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 8.0.20 PHP Post Max Size: 8 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: 7.84.0 OpenSSL/1.1.1p SUHOSIN Installed: – MySQL Version: 5.7.38 Max Upload Size: 5 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected. DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 6.6.1 WC Database Prefix: wpxn_ Total Database Size: 1711.71MB Database Data Size: 1585.10MB Database Index Size: 126.61MB wpxn_woocommerce_sessions: Data: 5.02MB + Index: 0.06MB + Engine InnoDB wpxn_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpxn_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpxn_woocommerce_order_items: Data: 2.52MB + Index: 0.47MB + Engine InnoDB wpxn_woocommerce_order_itemmeta: Data: 20.55MB + Index: 10.03MB + Engine InnoDB wpxn_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpxn_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpxn_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpxn_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpxn_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpxn_woocommerce_payment_tokens: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wpxn_woocommerce_payment_tokenmeta: Data: 0.41MB + Index: 0.36MB + Engine InnoDB wpxn_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 12ATmgekd_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 12ATmgekd_comments: Data: 0.02MB + Index: 0.08MB + Engine InnoDB 12ATmgekd_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 12ATmgekd_options: Data: 0.09MB + Index: 0.03MB + Engine InnoDB 12ATmgekd_postmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 12ATmgekd_posts: Data: 0.02MB + Index: 0.06MB + Engine InnoDB 12ATmgekd_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 12ATmgekd_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 12ATmgekd_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 12ATmgekd_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 12ATmgekd_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 12ATmgekd_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpar_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpar_comments: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wpar_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpar_options: Data: 0.08MB + Index: 0.03MB + Engine InnoDB wpar_postmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpar_posts: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpar_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpar_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpar_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpar_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpar_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpar_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpxn_acfw_store_credits: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpxn_acfw_virtual_coupons: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wpxn_actionscheduler_actions: Data: 7.52MB + Index: 12.95MB + Engine InnoDB wpxn_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_actionscheduler_logs: Data: 8.52MB + Index: 4.27MB + Engine InnoDB wpxn_aelia_dismissed_messages: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpxn_ce4wp_abandoned_checkout: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_commentmeta: Data: 0.34MB + Index: 0.34MB + Engine InnoDB wpxn_comments: Data: 8.52MB + Index: 9.09MB + Engine InnoDB wpxn_dgwt_wcas_index: Data: 1.52MB + Index: 0.02MB + Engine InnoDB wpxn_dgwt_wcas_invindex_cache: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpxn_dgwt_wcas_invindex_doclist: Data: 2.52MB + Index: 3.03MB + Engine InnoDB wpxn_dgwt_wcas_invindex_info: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpxn_dgwt_wcas_invindex_wordlist: Data: 0.08MB + Index: 0.05MB + Engine InnoDB wpxn_dgwt_wcas_tax_index: Data: 0.06MB + Index: 0.05MB + Engine InnoDB wpxn_e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_e_notes: Data: 0.02MB + Index: 0.17MB + Engine InnoDB wpxn_e_notes_users_relations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpxn_e_submissions: Data: 0.02MB + Index: 0.27MB + Engine InnoDB wpxn_e_submissions_actions_log: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wpxn_e_submissions_values: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpxn_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_metaseo_images: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_nx_entries: Data: 0.09MB + Index: 0.03MB + Engine InnoDB wpxn_nx_posts: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpxn_nx_stats: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_options: Data: 31.23MB + Index: 1.19MB + Engine InnoDB wpxn_pmxe_exports: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wpxn_pmxe_google_cats: Data: 0.38MB + Index: 0.00MB + Engine InnoDB wpxn_pmxe_posts: Data: 0.27MB + Index: 0.00MB + Engine InnoDB wpxn_pmxe_templates: Data: 0.03MB + Index: 0.00MB + Engine InnoDB wpxn_pmxi_files: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpxn_pmxi_hash: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wpxn_pmxi_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpxn_pmxi_images: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wpxn_pmxi_imports: Data: 0.45MB + Index: 0.00MB + Engine InnoDB wpxn_pmxi_posts: Data: 0.25MB + Index: 0.00MB + Engine InnoDB wpxn_pmxi_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpxn_postmeta: Data: 98.58MB + Index: 32.14MB + Engine InnoDB wpxn_posts: Data: 10.52MB + Index: 3.50MB + Engine InnoDB wpxn_redirection_404: Data: 3.02MB + Index: 0.94MB + Engine InnoDB wpxn_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpxn_redirection_items: Data: 0.16MB + Index: 0.19MB + Engine InnoDB wpxn_redirection_logs: Data: 2.02MB + Index: 0.36MB + Engine InnoDB wpxn_refersion_cart_tracking: Data: 0.31MB + Index: 0.41MB + Engine InnoDB wpxn_snippets: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpxn_termmeta: Data: 0.09MB + Index: 0.14MB + Engine InnoDB wpxn_terms: Data: 0.17MB + Index: 0.25MB + Engine InnoDB wpxn_term_relationships: Data: 1.36MB + Index: 0.38MB + Engine InnoDB wpxn_term_taxonomy: Data: 0.11MB + Index: 0.13MB + Engine InnoDB wpxn_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpxn_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_usermeta: Data: 9.52MB + Index: 8.84MB + Engine InnoDB wpxn_users: Data: 0.47MB + Index: 0.45MB + Engine InnoDB wpxn_wcs_payment_retries: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wpxn_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpxn_wc_customer_lookup: Data: 0.41MB + Index: 0.34MB + Engine InnoDB wpxn_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpxn_wc_order_coupon_lookup: Data: 0.13MB + Index: 0.14MB + Engine InnoDB wpxn_wc_order_product_lookup: Data: 1.52MB + Index: 0.80MB + Engine InnoDB wpxn_wc_order_stats: Data: 1.52MB + Index: 0.58MB + Engine InnoDB wpxn_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpxn_wc_product_attributes_lookup: Data: 0.11MB + Index: 0.09MB + Engine InnoDB wpxn_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_wc_product_meta_lookup: Data: 0.11MB + Index: 0.19MB + Engine InnoDB wpxn_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_wc_reserved_stock: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wpxn_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_woocommerce_bis_activity: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpxn_woocommerce_bis_notifications: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wpxn_woocommerce_bis_notificationsmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpxn_woocommerce_exported_csv_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpxn_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpxn_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpxn_wpms_links: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpxn_wpr_rucss_resources: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpxn_wpr_rucss_used_css: Data: 1134.50MB + Index: 0.58MB + Engine InnoDB wpxn_yoast_indexable: Data: 6.52MB + Index: 3.05MB + Engine InnoDB wpxn_yoast_indexable_hierarchy: Data: 0.16MB + Index: 0.25MB + Engine InnoDB wpxn_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpxn_yoast_primary_term: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wpxn_yoast_seo_links: Data: 0.42MB + Index: 0.23MB + Engine InnoDB wpxn_ywdpd_exclusion_list_table: Data: 0.02MB + Index: 0.03MB + Engine InnoDB __wpxn_acfw_store_credits: Data: 0.02MB + Index: 0.00MB + Engine InnoDB __wpxn_acfw_virtual_coupons: Data: 0.02MB + Index: 0.00MB + Engine InnoDB __wpxn_actionscheduler_actions: Data: 2.52MB + Index: 1.70MB + Engine InnoDB __wpxn_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_actionscheduler_logs: Data: 2.52MB + Index: 0.89MB + Engine InnoDB __wpxn_cartflows_ca_cart_abandonment: Data: 0.36MB + Index: 0.02MB + Engine InnoDB __wpxn_cartflows_ca_email_history: Data: 0.02MB + Index: 0.03MB + Engine InnoDB __wpxn_cartflows_ca_email_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB __wpxn_cartflows_ca_email_templates_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_ce4wp_abandoned_checkout: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_commentmeta: Data: 0.14MB + Index: 0.16MB + Engine InnoDB __wpxn_comments: Data: 2.52MB + Index: 1.17MB + Engine InnoDB __wpxn_e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_e_submissions: Data: 0.02MB + Index: 0.27MB + Engine InnoDB __wpxn_e_submissions_actions_log: Data: 0.02MB + Index: 0.11MB + Engine InnoDB __wpxn_e_submissions_values: Data: 0.02MB + Index: 0.03MB + Engine InnoDB __wpxn_imagify_files: Data: 0.31MB + Index: 0.17MB + Engine InnoDB __wpxn_imagify_folders: Data: 0.02MB + Index: 0.03MB + Engine InnoDB __wpxn_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_options: Data: 21.52MB + Index: 0.36MB + Engine InnoDB __wpxn_postmeta: Data: 138.56MB + Index: 11.03MB + Engine InnoDB __wpxn_posts: Data: 25.52MB + Index: 0.97MB + Engine InnoDB __wpxn_redirection_404: Data: 2.52MB + Index: 0.58MB + Engine InnoDB __wpxn_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB __wpxn_redirection_items: Data: 0.14MB + Index: 0.19MB + Engine InnoDB __wpxn_redirection_logs: Data: 1.52MB + Index: 0.22MB + Engine InnoDB __wpxn_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB __wpxn_termmeta: Data: 0.08MB + Index: 0.11MB + Engine InnoDB __wpxn_terms: Data: 0.22MB + Index: 0.22MB + Engine InnoDB __wpxn_term_relationships: Data: 0.41MB + Index: 0.22MB + Engine InnoDB __wpxn_term_taxonomy: Data: 0.11MB + Index: 0.09MB + Engine InnoDB __wpxn_usermeta: Data: 3.52MB + Index: 3.03MB + Engine InnoDB __wpxn_users: Data: 0.20MB + Index: 0.17MB + Engine InnoDB __wpxn_wcs_payment_retries: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB __wpxn_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB __wpxn_wc_customer_lookup: Data: 0.19MB + Index: 0.13MB + Engine InnoDB __wpxn_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB __wpxn_wc_order_coupon_lookup: Data: 0.06MB + Index: 0.06MB + Engine InnoDB __wpxn_wc_order_product_lookup: Data: 0.52MB + Index: 0.42MB + Engine InnoDB __wpxn_wc_order_stats: Data: 0.22MB + Index: 0.19MB + Engine InnoDB __wpxn_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB __wpxn_wc_product_attributes_lookup: Data: 0.09MB + Index: 0.09MB + Engine InnoDB __wpxn_wc_product_meta_lookup: Data: 0.08MB + Index: 0.13MB + Engine InnoDB __wpxn_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB __wpxn_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB __wpxn_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB __wpxn_woocommerce_exported_csv_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_woocommerce_order_itemmeta: Data: 5.52MB + Index: 3.03MB + Engine InnoDB __wpxn_woocommerce_order_items: Data: 0.52MB + Index: 0.16MB + Engine InnoDB __wpxn_woocommerce_payment_tokenmeta: Data: 0.08MB + Index: 0.09MB + Engine InnoDB __wpxn_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_woocommerce_sessions: Data: 2.52MB + Index: 0.05MB + Engine InnoDB __wpxn_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB __wpxn_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB __wpxn_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB __wpxn_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB __wpxn_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB __wpxn_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB __wpxn_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB __wpxn_yoast_indexable: Data: 4.52MB + Index: 1.02MB + Engine InnoDB __wpxn_yoast_indexable_hierarchy: Data: 0.09MB + Index: 0.14MB + Engine InnoDB __wpxn_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB __wpxn_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB __wpxn_yoast_seo_links: Data: 0.08MB + Index: 0.03MB + Engine InnoDB __wpxn_ywdpd_exclusion_list_table: Data: 0.02MB + Index: 0.03MB + Engine InnoDB ### Post Type Counts ### attachment: 2227 customize_changeset: 1 custom_css: 1 elementor_library: 21 nav_menu_item: 211 oembed_cache: 2 page: 33 post: 23 product: 727 revision: 21 shop_coupon: 1515 shop_order: 5922 shop_order_refund: 70 wpforms: 2 wp_block: 1 wp_global_styles: 1 ywdpd_discount: 2 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ?Error messages should not be shown to visitors. ### Active Plugins (40) ### Advanced Coupons for WooCommerce Free: by Rymera Web Co – 4.3.2 Advanced Coupons for WooCommerce Premium: by Rymera Web Co – 3.3.1 FiboSearch - AJAX Search for WooCommerce (Pro): by FiboSearch Team – 1.18.0 Astra Pro: by Brainstorm Force – 3.6.11 Auto Image Attributes From Filename With Bulk Updater: by Arun Basil Lal – 3.2 CheckoutWC: by Objectiv – 7.3.2 Elementor Pro: by Elementor.com – 3.7.2 Elementor: by Elementor.com – 3.6.6 Essential Addons for Elementor: by WPDeveloper – 5.1.7 Head, Footer and Post Injections: by Stefano Lissa – 3.2.5 herb.co-tracking: by Herb.co – 1.2 Hotjar: by Hotjar – 1.0.14 Infinite Scroll Elementor: by Joy Chetry – 2.4.1 Jetpack: by Automattic – 11.0 Klaviyo: by Klaviyo Inc. – 3.0.3 NotificationX Pro: by WPDeveloper – 2.5.4 NotificationX: by WPDeveloper – 2.5.3 Perfect Brands for WooCommerce: by QuadLayers – 2.1.4 Redirection: by John Godley – 5.2.3 Refersion for WooCommerce: by Refersion Inc. – 4.9.2 Stamped.io Reviews & UGC for WooCommerce: by Stamped.io – 2.3.2 Table of Contents Plus: by Michael Tran – 2106 Ultimate Addons for Elementor: by Brainstorm Force – 1.36.7 Aelia Foundation Classes for WooCommerce: by Aelia – 2.2.8.220607 WebP Converter for Media: by Mateusz Gbiorczyk – 4.4.1 WPC Fly Cart for WooCommerce (Premium): by WPClever – 4.3.1 WooCommerce Back In Stock Notifications: by WooCommerce – 1.3.2 Aelia Blacklister for WooCommerce: by Aelia – 1.1.13.220607 WooCommerce Authorize.Net Gateway: by SkyVerge – 3.7.2 WooCommerce Google Analytics Integration: by WooCommerce – 1.5.10 WooCommerce Sequential Order Numbers: by SkyVerge – 1.9.6 WooCommerce - ShipStation Integration: by WooCommerce – 4.1.48 WooCommerce: by Automattic – 6.6.1 Yoast SEO: by Team Yoast – 19.2 WP Mail SMTP: by WPForms – 3.4.0 WP Rocket: by WP Media – 3.11.3 WP Sitemap Page: by Tony Archambeau – 1.9.1 WPForms Lite: by WPForms – 1.7.5.1 Yoast SEO: WooCommerce: by Team Yoast – 14.9 YITH WooCommerce Dynamic Pricing and Discounts Premium: by YITH – 3.7.0 ### Inactive Plugins (5) ### Migrate Guru: by Migrate Guru – 4.78 WP All Export - WooCommerce Export Add-On Pro: by Soflyy – 1.0.5 WP All Export Pro: by Soflyy – 1.7.8 WP All Import - WooCommerce Import Add-On Pro: by Soflyy – 3.3.1 WP All Import Pro: by Soflyy – 4.7.3 ### Dropin Plugins (1) ### advanced-cache.php: advanced-cache.php ### Must Use Plugins (1) ### Elementor Safe Mode: by Elementor.com – 1.0.0 ### Settings ### API Enabled: – Force SSL: ? Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: ? Enforce Approved Product Download Directories: – ### WC Pages ### Shop base: #12769 - /shop Cart: ? Page does not contain the [woocommerce_cart] shortcode or the woocommerce/cart block. Checkout: ? Page does not contain the [woocommerce_checkout] shortcode or the woocommerce/checkout block. My account: #8 - /my-account Terms and conditions: #4188 - /terms-conditions ### Theme ### Name: Astra Version: 3.8.5 Author URL: https://wpastra.com/about/?utm_source=theme_preview&utm_medium=author_link&utm_campaign=astra_theme Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ? ### Templates ### Overrides: – ### Back In Stock ### Database Version: 1.3.2 Loopback Test: ? ### Authorize.Net Credit Card ### Environment: Production Tokenization Enabled: Debug Mode: Off Webhooks Enabled: ? Not generated ### Admin ### Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices wc-pay-promotion wc-pay-welcome-page wc-pay-subscriptions-page Disabled Features: minified-js settings Daily Cron: ? Next scheduled: 2022-07-03 19:35:48 -05:00 Options: ? Notes: 74 Onboarding: completed ### Action Scheduler ### Canceled: 1 Oldest: 2022-06-03 11:59:15 -0500 Newest: 2022-06-03 11:59:15 -0500 Complete: 16,505 Oldest: 2022-06-02 12:17:40 -0500 Newest: 2022-07-02 18:44:35 -0500 Failed: 1,866 Oldest: 2022-04-12 11:20:32 -0500 Newest: 2022-04-13 17:41:32 -0500 Pending: 9 Oldest: 2022-07-02 20:54:34 -0500 Newest: 2022-07-05 03:00:00 -0500 ### Status report information ### Generated at: 2022-07-02 18:50:32 -05:00
2022-06-03T13:49:22+00:00 CRITICAL Allowed memory size of 1048576000 bytes exhausted (tried to allocate 249563264 bytes) in /home/d8superstore/public_html/wp-content/plugins/wp-database-backup/includes/admin/class-wpdb-admin.php on line 1542
2022-06-03T13:49:39+00:00 CRITICAL Allowed memory size of 1048576000 bytes exhausted (tried to allocate 249564496 bytes) in /home/d8superstore/public_html/wp-content/plugins/wp-database-backup/includes/admin/class-wpdb-admin.php on line 1542
Hello,
Did you apply that custom code via the Code Snippets plugin? I’ve tried it using Code Snippets, and I can confirm that it works on my test site.
You can refer to the following link to properly apply custom snippets:
https://woocommerce.com/document/customizing-woocommerce-best-practices/#section-4If you still get the error, you may want to check if there is a conflict with your theme or another plugin:
https://docs.woocommerce.com/document/how-to-test-for-conflicts/So, I got it to work on product archives, but I can’t seem to get it work on pages with product widgets. For example, d8superstore.com/brand/cake is working but d8superstore.com/new-releases isn’t.
Hi @budddwyer
I checked the page that you’re mentioning isn’t working ( /new-releases), but I can see some out-of-stock items.
Have you figured it out?
Image link if the above doesn’t load: https://snipboard.io/KcTqGW.jpg
I hope to hear from you soon! All the best,
- The topic ‘How to Display Out of Stock Products Last’ is closed to new replies.