• Resolved danielbair

    (@danielbair)


    I noticed this a while ago, but hadn’t had time to debug it then.

    I have the latest WooCommerce plugin version and WordPress version installed.
    We have WooCommerce installed on WPEngine.com so I copied to staging to debug.
    I disabled all other WP plugins but the WooCommerce core plugin and changed the theme to the default StoreFront theme. The database is still the same as our live site.

    I cannot set any product as featured. If I click on the star icon in the products admin view, it reloads the page but doesn’t change that product to featured. If I use quick edit and check the featured box on visibility and click update, featured remains unchecked. If I edit the product and click edit on product visibility and then check the featured product box, then click ok and then click update, no change again.

    I am stumped. I have even deleted all other plugins just in case of a poorly coded plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • James

    (@volcommky)

    Strange that it is not working for you – could you try running something on the database?

    In later releases of WC it seems that the _featured flag is no longer a post_meta record, it is not a term relationship.

    This SQL Query lists all products that are featured.

    SELECT t.term_id, t.name, tr.object_id AS product_id FROM wp_terms AS t 
    INNER JOIN wo_term_taxonomy AS tt ON (tt.term_id = t.term_id) 
    INNER JOIN wp_term_relationships AS tr ON (tr.term_taxonomy_id = tt.term_taxonomy_id) 
    WHERE tt.taxonomy = 'product_visibility' AND t.name = 'featured'
    ORDER BY t.name ASC;
    Thread Starter danielbair

    (@danielbair)

    Ok. I got “MySQL returned an empty result set (i.e. zero rows). (Query took 0.0669 seconds.)”

    • This reply was modified 9 years ago by danielbair.
    Thread Starter danielbair

    (@danielbair)

    I installed WP CleanFix and was able to resolve this.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Cannot set featured product’ is closed to new replies.