Slow query while searching a product woocommerce

I was struggling with this issue since long with my wordpress with wooocommerce website. Whenever i was doing a search in admin dashboard for wooommerce products it was taking long time and end up with no results.

SELECT DISTINCT posts.ID as product_id, posts.post_parent as parent_id
    FROM wp_posts posts 
         LEFT JOIN wp_postmeta postmeta ON posts.ID = postmeta.post_id 
    WHERE ( posts.post_title LIKE '%Samsung%' 
            OR posts.post_excerpt LIKE '%Samsung%' 
            OR posts.post_content LIKE '%Samsung%' 
            OR ( postmeta.meta_key = '_sku'
                 AND postmeta.meta_value LIKE '%Samsung%' ) ) 
          AND posts.post_type IN ('product','product_variation') 
    ORDER BY posts.post_parent ASC, posts.post_title ASC

After months of troubleshooting i am still not able to fully resolve the issue, however with this workaround i am finally somewhat relived.

To resolve this issue…

Edit this file – public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php

In Woocommerce version 3.4.6 look for search_products function

On line no. 1397 look for

$term_group_query .= $wpdb->prepare( ” {$searchand} ( ( posts.post_title LIKE %s) OR ( posts.post_excerpt LIKE %s) OR ( posts.post_content LIKE %s ) OR ( postmeta.meta_key = ‘_sku’ AND postmeta.meta_value LIKE %s ) )”, $like, $like, $like, $like ); // @codingStandardsIgnoreLine.

Remove following code

OR ( postmeta.meta_key = ‘_sku’ AND postmeta.meta_value LIKE %s )

It should then look like this…

$term_group_query .= $wpdb->prepare( ” {$searchand} ( ( posts.post_title LIKE %s) OR ( posts.post_excerpt LIKE %s) OR ( posts.post_content LIKE %s ) )”, $like, $like, $like, $like ); // @codingStandardsIgnoreLine.

Save the file and you should be able to search for products now. The downside with this is you’ll not be able to search SKU’s. But i was ok with this as dont have SKU’s added to my products.

I hope this will help you.

How to unlink your Aadhaar UIDAI Card?

UIDAI Aadhaar

The Supreme Court on Wednesday declared government’s Aadhaar scheme as Constitutionally valid and also struck down Section 57 of Aadhaar Act permitting private entities to avail Aadhaar data. “Robust data protection regime has to be brought in place as early as possible,” Justice Sikri said while reading out the majority judgement.

The court said that the Aadhaar authentication data cannot be stored for more than six months.

WHAT NEEDS AADHAAR LINKING:
1) It is mandatory to link PAN card with Aadhaar
2) Aadhaar is a must for filing income tax returns
3) Aadhaar is necessary for availing welfare schemes and subsidies given by the government

Not Required
Aadhaar not mandatory for opening of bank account
No mobile company can demand “Aadhaar card”
Aadhaar need not be made compulsory for school admissions
CBSE, NEET, UGC cannot make Aadhaar mandatory
Telecom service providers can’t seek linking of Aadhaar
Not mandatory to link Aadhaar to bank accounts

As of today telecom operators, banks, schools etc have not provided any facility for customers to unlink their aadhaar card. Hopefully this situation will change soon.

Vensmile MiniPC Teardown

The Vensmile W10 mini PC assists you to share photos, music and videos easily from the computer. And the multimedia files can be displayed on TV monitor, computer screen or projector. The Vensmile W10 mini PC also supports miracast and airplay technology. So it is a innovative tools for your life. You can use it to connect your home multimedia entertainment, and you can also take it to your office and other places

MI Wi-Fi Router Error no new or unpaired mi wi-fi was detected

 

 

mi wi fi router error

New update of Mi Wi-Fi app failed to pair with the MI router. you can go thru following steps to resolve the issue. i hope MI resolves the issue with their app soon

  • Uninstall any existing version of Mi Wi-Fi app
  • Download and Install the Mi Wi-Fi app old version 4.0.0 from this Link
  • Sign-in with your existing account or setup a new rotuer
  • and that’s done, you should be able to pair your router with the app.

IOST Airdrop & Community Hub Referral Program

IOST Airdrop & Community Hub Referral Program 100 IOST & Daily IOST Up to ~$150“Great Project, Valuable, Highly Recommended”
IOST offers a secure & scalable infrastructure for online service providers. Its high TPS, scalable and secure blockchain, and privacy protection provide infinite possibilities for online service providers to serve their customer base.

IOST Community Hub Referral Program

IOST is airdropping free IOST tokens to user’s signup at their hub answers some simple questions. Sign up at their hub and answer some simple questions to get 100 IOST tokens.

Claim your airdrop, go to IOST Page below: https://goo.gl/iF7Jo5

Quiz answers:
1. All of the above!
2. All of the above!

Step-by-Step Guide:
1. Verify your mobile number and login.
2. Answer all the questions correctly.
3. You will get 100 IOST tokens.
4. Go to the “Quests” tab to earn additional IOST tokens.
5. You can also earn more IOST for daily check-in to the platform.

Notes;
-Ref Bonus : 600 IOST
-Price : 1 IOST = 0.02$
To get more detail, go to the Announcement page:

[IOST: 400X ETH & 10X EOS] #IOST, backed by Sequoia Cap China & 30+ institutions investors, is already 400X faster than Ethereum and 10X more decentralized than EOS. Join the #IOST Community Hub & claim up to 100,000+ IOST – https://goo.gl/iF7Jo5

 

Token Prizes:

For the first 10,000 Participants = Inviter receives 600 IOST, Invitee receives 100 IOST

10,000–30,000 Participants = Inviter receives 300 IOST, Invitee receives 50 IOST

30,000–50,000 Participants = Inviter receives 200 IOST, Invitee receives 25 IOST

>50,000 Participants = Inviter receives 100 IOST, Invitee receives 20 IOST