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
- 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
- Case statement in MySQL
- Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user ‘root’@’localhost'(using password:YES)
- Error: Duplicate entry ‘0’ for key ‘PRIMARY’
- Resetting comment count
- Changing user_nicename
- How to hook on a WooCommerce checkout field?
- Woocommerce – How to add 5 stars to all products to test design
- Split a database will improve performance?
- How to get woocomerce attributes thumbnail in PHP? [closed]
- Programmatically added variations not showing until clicking Update button
- How to automatically add and show all the product attributes when creating a new product
- Import products to WooCommerce by CSV page won’t open [closed]
- How can i change the design of product sizes [closed]
- How do I get the latest note on the order at woocommerce? [closed]
- Woocommerce Login Redirect not working [closed]
- How to Query Database for posts with certain Taxonomy Term
- How to add a user custom field into Woocommerce emails?
- WooCommerce subscription, give option to prorate or not to prorate to user while switching subscription
- How to handle Woocommerce API credentials
- Get product variation attribute titles – WooCommerce
- user password reset e-mail
- Extending the woocommerce product export functionality
- How to remove /year/month from uploaded medias?
- new multisite, old db
- Call to undefined function get_user_meta() – trying to access data in MySQL from custom fields
- Have working sql query… trying to adjust it to use $wpdb
- Custom Price for WooCommerce [closed]
- Absolute search against wordpress api
- Is it possible to remove editor from a custom product type?
- /page/ is not working with a custom permalink structure (WooCommerce)
- How to select particular month post from table and update the post status using MySQL?
- WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [closed]
- Trying to run Javascript on AJAX call
- Rewrite rules for sub category (child product categry & grand-child)
- Woocommerce show field in product if product-tag is “VET” else hide
- How to make a “subtitle” for each Woocommerce product
- Create Product with Woocommerce API, but Variations are not linked
- Google Analytics gtag code messes up woocommerce cart & login
- Woocommerce API security concerns
- How to add a wrapper element on image for products page
- Dynamic subdomains for woocommerce affiliate sales but NO multisite. Is that possible?
- I wan redirect link post search to search product woocommerce?
- WordPress how do I echo SUM from a column of a MySQL table by user id AND type_operation
- Using wpdb to connect to a different database is not working
- Limit image resolution on upload file for specific field
- How to send welcome email once user buys the subscription
- Removed Sidebar in single product page
- Reorder PRODUCTS in categories Woo
- Enable Payment gateway if ACF checkbox in user profile is checked
- Woocommerce section name? [closed]
- how to change value return by _stock_status
- Retrieve Woocommerce Cart Url with javascript/jquery [closed]
- deactivate product-page image slider on mobile
- WooCommerce widget “WooCommerce Products” template [closed]
- Woocommerce woocommerce_breadcrumb_defaults filter [closed]
- Some Admin disappeared
- Sort by promo code used woocommerce admin panel [closed]
- Search box missing Woocommerce Product Bundle Extension
- DatePicker in Woocommerce (My Account) Registration [closed]
- problems with an object product wooCommerce [closed]
- Hide price, “add to cart” button and show message “Please log in to shop” [closed]