Firstly, the GUID is not the URL. It is a “globally unique identifier”. WordPress uses the URL for this purpose, but accessing it is not a reliable way to get the URL for anything (this was a bad idea, but is kept this way for backwards compatibility).
It’s not possible to query the image URL from the database directly. The full URL is not stored there. But if you have the ID for a product and want to get the URL for its image you can do this:
$product = wc_get_product( $product_id );
$image_id = $product->get_image_id();
$image_url = wp_get_attachment_image_url( $image_id, 'full' );
Related Posts:
- How to select from two different tables to display orders list with custom column from other table
- Deleted products from woocommerce are still in the database
- PHP Warning: Error while sending QUERY packet
- Product reviews in my sql database
- Share users and WooCommerce memberships between two installations
- Is it possible to add custom fields to a WooCommerce attribute term? [closed]
- Is it safe to delete from db orphaned posts i.e. whose post_parent no longer exists?
- Where is the “default attribute” values located in the phpMyAdmin in Woocommerce?
- WooCommerce – Query for ordered products
- How can i create a WooCommerce product programatically or using sql query?
- Programmatically adding product attributes to WP / Woo commerce
- Woocommerce PHP site that shows table with orders from specific category
- How to delete all customer user account that haven’t placed a single order?
- 600k of option_name “c_facebook_background_product_sync_job”
- Is it safe to have 2 mysql users?
- DELETE WooCommerce Order data from database
- A function to add arguments to a taxonomy
- Should I use docker in wordpress production?
- Same request Mysql/Php not same result
- Get decimal from product price with Mysql
- Help me to intergrate product database to WordPress
- Undo WooCommerce CSV import
- Restore woocommerce orders
- WooCommerce – 500k Jump in Order Number?
- WordPress Development Workflow
- How to merge 2 accounts with same email address after merge of 2 woocommerce databases
- Update WooCommerce stock status with SQL query if stock value is greater than 0
- Update a list of product to featured if product have meta value (Mysql not wpquery)
- MySQL error or data corruption after database migration
- Query product’s image path by category WooCommerce database?
- Does WP-WooC support filters at database?
- WooCommerce database upgrade behaviour
- Update a user meta key based on WooCommerce product purchase
- Alter the cost of products using phpmyadmin sql query
- Mysql query – amount spent by customer
- How Fragile Is DB if I Upload Completely Updated Files
- In woocommerce some products have empty options, but how to check this
- Update WooCommerce Short Description using SQL
- Export Woocomerce Image Product URL
- Woocommerce permalink URL change in DB
- Woocommerce plugin increasing Database size
- To many WooCommmerce related transients in WordPress options table
- Converting longtext to mediumtext in WordPress wp_postmeta table
- WooCommerce – dynamically loading checkout page using ajax not showing payment methods for guest
- SOLVED – add_action() for $product->get_date_created
- Add “new” tag for existing products
- DB prefix not updating
- Sort products by Sale price and stock status
- How to hide a random text with a div tag using a class on product pages with a specific tag
- Pagination in woocommerce – Limiting page-numbers
- Two Filter Issue [closed]
- How to edit wc_get_template_part for archive products
- Switch to user link shortcode
- apply_filter and add_filter conflict
- Syncing WP Database Changes Between Environments: How To Handle Merging w/o touching database
- Missing variable options on add to cart form
- Migrating WordPress + WooCommerce from server to Local
- wp-cron and woocommerce subscriptions killing performance
- Show shipping class in admin order list
- Woocommerce / Product Columns on Shop Loop / Responsive
- How to add php variable inside wc_enqueue_js(‘jQuery’) function?
- Show menu order field in quick edit
- Cant create table on plugin activation
- How to Add “parent category description” in Woocommerce sub category page if there is no description available for child category
- wc_get_product_id_by_sku() returns 0 for products added programatically via update_post_meta
- Woocommerce – Hide shipping at all, if only certain product or products with certain shipping class is in the cart
- UX Builder not loading for product description edits
- Adapt shipping surcharge code [closed]
- Display “Add to basket” and “Read more” buttons in the products shop page with woocommerce
- One Time Access URL after purchasing subscription
- How to fetch WooCommerce products with 50% discount?
- Create order actions from custom fields woocommerce
- How to access product’s meta data when deleting a WooCommerce product?
- I need help with storefront theme shop page
- How Can I fix Woocommerce Billing Address Field? [closed]
- Running JavaScript after using WooCommerce Filter Plugin
- Anonymous users can not access website
- Include stock information in WooCommerce order confirmation email
- Redirecting orders by company field
- Recovery – Restore Database after moving folder location locally
- How to show specific admin menu to specific user role?
- Update user meta when customer update their first name
- Upload file to Woocommerce Order
- Restrict product tags archive to certain users
- How to get rid of variations with unspecified attributes
- Assign user role by text field in WordPress (Woocommerce) [closed]
- Why last row deleted when refresh page
- Replacing javascript link in WordPress database without getting mysql syntax errors
- Logo showing on some page but not on product categories pages
- wp_login overriding user meta data
- Need help with woocommerce roles
- call_user_func_array() expects parameter 1 to be a valid callback, class ‘WC_Rapyd’ does not have a method ‘install’
- Add quantity of variations together and show it to parent quantity field Woocommerce
- Optimise wordpress database using SQL after deleting registered images from Media Folder
- Urgent Validate Save-Post Hooks on Woo-commerce product entry form!
- pass a woocommerce product name to contact form7?
- Change WooCommerce product and variation prices programatically without affecting performance
- Woocommerce: How to change the attribute values per product
- Help to locate a woocommerce hook method
- Is doing a database query in Woocommerce efficient to only display posts from a certain category?