If there are no search results, then it is somewhat expected that the $post
variable is empty and there are no properties in it to be used in the if statements.
You can prevent the error by adding an if statement to make sure $post
is what it is supposed to be before the line 3392.
if ( ! is_object($post) || ! is_a($post, 'WP_Post') ) ) {
return;
}
Or the lazy way
if ( empty( $post->ID ) ) {
return;
}
You can always use var_dump
to check / debug your variables to make sure they contain the stuff you need.
Related Posts:
- Search results don’t show products
- How to search Woo Commerce products with punctuation in title?
- Woocommerce wp-admin search products through custom meta value too
- if statement for search results
- Separeting product from post in search result
- Woocommerce custom search
- Change the Title Tag of Search Products Page
- WooCommerce orderby template disappears and not longer works on search page
- search customers in front end by billing data
- Create a shortcode for native WooCommerce search form [closed]
- Can’t find a product by SKU
- Absolute search against wordpress api
- override the default WooCommerce products search form
- Create a Search Form that only Searches with WooCommerce Sale Products
- Call product search from custom hook
- Search doesn’t return anything
- edit URL of search result
- No Results in WooCommerce Product Search
- Woocommerce Multisite global search how to mod ajax function?
- I wan redirect link post search to search product woocommerce?
- How to filter result set in custom metaboxes?
- Woocommerce: Search by custom attribute
- How can I change my search form to bring up product results, not blog results
- Is it possible to hide certain products from displaying in the search results
- Woocommerce ajax search can’t work on mobile
- Pass custom Checkout field value to Stripe gateway in WooCommerce
- WooCommerce Shop Page Not Found 404
- How can I show an empty WooCommerce cart? [closed]
- Woocommerce Pre Orders – Can i override templates?
- Woocommerce checkout via external page [closed]
- Programmatically adding product attributes to WP / Woo commerce
- Display File Types For Woocommerce Downloadable Products On Product Page
- Programmatically setting Woocommerce product price
- Woocommerce reviews xss issue [closed]
- Woocommerce REST API allow normal users make an order
- WooComerce shows blank site (Shop)
- How to update custom field in WooCommerce
- Add product categories to receipt
- Woocommerce specific product template for product type
- How can I use a gravity form to send an e-card?
- How to select default Woocommerce category page
- Creating Product Table using Gutenberg
- I can ‘t display product images based on the label
- SKU for each product on every page
- Timber, Twig, and Woocommerce: Last product stays in the cart after checkout
- Woocommerce Cart Default Language Not Changing
- Make this Fast and Queryable
- WooCommerce slider filter for numerical attributes
- Reordering product tab under product image [closed]
- How do I change the default state label for a country on the WooCommerce checkout page?
- How do I change the core post search algorithm? Where is it found/constructed?
- WooCommerce Tax Filter Not Fired [closed]
- woocommerce – customise notice error in checkout page
- Using a filter to change a path
- Woocommerce, prevent login after registration and redirect to custom URL
- Order with custom order status disappeared once the page is refreshed
- WooCommerce Product detail page: Add content under thumbnails [closed]
- How to add product filter dropdown in woo commerce order page?
- Unable to paste google analytics con header.php [closed]
- wordpress/woocommerce login url not redirecting correctly
- Add Attribute to Woocommerce programatically, doesn’t display front end [closed]
- Link a button to woofunnels model
- Woocommerce – Add additional item if some item wants to be added to the cart?
- Hook “wp_trash_post” executing multiple time in case of bulk trash products
- WooCommerce Subscriptions: Hide one variation subscription
- Contact form 7 send product PDF after submit
- Add sub variations in product page
- Woo commerce product quantity wise SKU
- Override une fonction dans une class Woocommerce
- validation field form registration vendor dokan woocommerce
- Delete unpublished woocommerce products
- List of JS events in the WooCommerce frontend
- Woocommerce / Product Columns on Shop Loop / Responsive
- Redirecting orders by company field
- WooCommerce Product Search box with 3 dropdown menus
- Split taxonomies on different pages
- woocommerce REST api on the website’s front-end
- How to do_action after some plugin{woocs} loaded?
- How can I change field values of posts before displaying
- Editing fields required in the WooCommerce / WordPress registration form [closed]
- WC Booking query bookings with date ranges
- Select all product woocommerce
- Woocommerce REST API: creating variations
- How to customize product at cart page
- WooCommerce Storefront site-header padding
- How to check which shortcode is using my template?
- woocommerce: when adding or removing items to cart , it takes cart a few seconds to read changes?
- How to get woocommerce integration instance?
- When to use a child theme for WooCommerce Storefront?
- WooCommerce: Bulk Quantity in Cart
- Woocommerce shows empty columns [closed]
- Product atributes in title of order (not in description)
- How to create custome pdf file of my invioice in wordpress
- How to get sub items of parent menu item?
- WordPress and WooCommerce How to Assign Attribute Based Pricing
- Storefront Child Theme show product attribute [closed]
- How to dublicate WC Product title to shortdescription field? [closed]
- Create bookings after subscription renewal
- Change variants URL
- Use a woocommerce hook to create a table and populate it with a query