0

I know, as simple as it sounds but I don't get it running: How can I select the product visibility for a product by his id via SQL?

This is what I have:

global $wpdb;
$result = $wpdb->get_col( "SELECT catalog_visibility FROM XXX WHERE product_id = 3" );

And yes, I need to do this via SQL because I'm working on a large SQL select where this must be a part from.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.