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
- Woocommerce plugin increasing Database size
- To many WooCommmerce related transients in WordPress options table
- Converting longtext to mediumtext in WordPress wp_postmeta table
- How do I quickly rename a MySQL database (change schema name)?
- Is it possible to define two databases for one installation?
- How To Make Connection To WordPress Data Base In A Plugin?
- Display WooCommerce only in stock sizes product attribute on shop page
- Remove “Choose An Option” on Product Variation & Auto Select Instead
- check if current url/page equals checkout page [closed]
- Mini cart in header using divi is not getting updated on changing the cart items count:
- Woocommerce Product Price Inserted programmatically doesn’t get displayed In Single Product Page
- How to Order by random on a SQL query
- Move add to cart in Woocommerce
- Exclude products with a stock lower than the low stock threshold from the shop loop [closed]
- Remove Order List Row Link in WooCommerce Admin?
- How do I hide out of stock products from homepage but not from catalog?
- WooCommerce – Display nested list of all subcategories on archive-product.php
- Woocommerce Porto Theme Hide Selected Categroy for Breadcrumbs
- How to list all WC products by their attributes values?
- Showing the WordPress standard text area on a Woocommerce Single Product Page?
- Woocommerce custom search
- WordPress WooCommerce: How to allow only specified customers to pay by check? [closed]
- Make a Read More toggle in the_content on single-product in Woocoomerce
- WooCommerce Base Page Featured Image Custom Theme
- Not connecting to database in file with multiple MySQL connections
- WooCommerce – Global $product is returning value null
- WooCommerce Stripe Plugin not showing up in settings [closed]
- Woocommerce, finding the ordinal number of a purchase for a certain product
- WooCommerce order refund get qty refunded
- Add custom body tag if product is out of stock
- SQL query to set posts in bulk based on the post content
- Protecting WooCommerce Customizations with Update
- Fetch a single row from a custom table for to a given ID
- Database create or redirect
- Performing CRUD operations on front end in wordpress
- Conditional for product attribute page
- Setting Page Visibility for WooCommerce Default Page Doesn’t Work
- Remove cart functionality from WooCommerce so it doesn’t remember the products [closed]
- Apply CSS to certain product thumbnails only
- Order Woocommerce Products by On Sale and Alphabetically
- How to track product price changes?
- Woocommerce Flexslider touch functionality on desktop not working
- Customer Email Address
- How to echo woocomerce attributes values in dropdown box
- Add new page in WooCommerce My Account page
- Uninitialised Parameters using woocommerce_checkout_update_order_meta hook
- Woocommerce customer role doesn’t change if user is already a subscriber [closed]
- How to get the WooCommercer product variation image
- how add css class to product boxes li, for img, add cart button, decs, price… [closed]
- How to extract some part of WordPress full source code
- Decrease stock quantity when a variation is sold using Woocommerce
- WooCommerce show decimals in totals [closed]
- Woocommerce – display all sold out products
- Woocommerce how to show most selling products by category
- AffiliateWP not calculating multiple quantities when using affwp_calc_referral_amount filter
- Hide a shipping method if cart total is higher than an amount
- WordPress pointing animated GIF images with wrong file name upon upload (GIFs animation not working)
- WordPress database connection failed, while mysql client is working [closed]
- WooCommerce custom SVG coloring tool [closed]
- Woocomerce erro shipping [closed]
- How do I prevent double the amount of stock being reduced with this Split Order Woocommerce Code? [closed]