The first parameter for get_the_post_thumbnail_url() is the post ID or post object, and not the image size which is actually the second parameter.
So:
// Instead of this:
get_the_post_thumbnail_url( 'thumbnail' )
// You should use:
get_the_post_thumbnail_url( get_the_ID(), 'thumbnail' ) // pass a post ID
get_the_post_thumbnail_url( get_post(), 'thumbnail' ) // or post object
// Or you can pass a null to use the current post:
get_the_post_thumbnail_url( null, 'thumbnail' )
Related Posts:
- Featured image for product listings, but another image as the product image?
- WooCommerce Base Page Featured Image Custom Theme
- Product thumbnail size in catalog
- WordPress pointing animated GIF images with wrong file name upon upload (GIFs animation not working)
- wc_get_template_part( ‘content’, ‘product’ ) | Where is this file located?
- how to get woocommerce product attribute slug
- How to build a plugin that supports authenticated POST requests to the REST API from external servers?
- Create WooCommerce custom stock option that is non-purchasable
- WooCommerce – Flat rate shipping based on X quantity steps?
- Where can I find a single item template
- Get Woocommerce Subscription Product
- Change “Shipping” text to “Delivery” everywhere I appears in woocommerce
- Customize WooCommerce orders displayed shipping
- WooCommerce pages accessible to logged in members only
- Woocomerce language
- paypal not showing on woocommerce payments
- Target WooCommerce Product Gallery Image (rather than Featured Image) for og:image
- How to update the WooCommerce cart Icon to show new products added with JavaScript
- Remove the link from the thumbnail and product title on woocommerce
- How to configure Woocommerce Payment Methods programmatically?
- woocommerce_package_rates not fired everytime
- how to change woocommerce shop archive description? [closed]
- How to display the result of a custom metabox in the frontend [closed]
- Quantity on the product card and subtotal disappear [closed]
- Admin access for custom user capabilities
- Remove add to cart icon/view product button woocommerce
- Products Shortcode is Displaying Single Product Page Price for all Products [closed]
- Subscription on Checkout
- Woocommerce – display product in page but in list format with excerpt
- how to show store name when I add a product on cart in woocommerce(woocommerce multi store)?
- When Free shipping is available hide other shipping methods except Local pickup in WooCommerce [closed]
- Create archive page for woocommerce attribute
- Refund from wooCommerce with stripe [closed]
- How to display Woocommerce variations prices and descriptions
- Adding Transaction-Specific Conversion Tracking from Adwords into WooCommerce
- New field on checkout is shown but it’s not saved on the order details [closed]
- How to rewrite product permalinks in Woocommerce to use category slugs
- Woocommerce altered my homepage, and I can’t figure out how to revert it [closed]
- Woocommerce – Problem sorting and filtering products with different tax rates by price [closed]
- Why does my loop breaks the css below?
- Single product page doesn’t display price
- Unable to paste google analytics con header.php [closed]
- WooCommerce get_author_posts_url() – Author URL redirecting to shop base
- Add Attribute to Woocommerce programatically, doesn’t display front end [closed]
- Link a button to woofunnels model
- Woocommerce – Add additional item if some item wants to be added to the cart?
- Hook “wp_trash_post” executing multiple time in case of bulk trash products
- WooCommerce Subscriptions: Hide one variation subscription
- Contact form 7 send product PDF after submit
- Add sub variations in product page
- Woo commerce product quantity wise SKU
- Override une fonction dans une class Woocommerce
- What to do if images are not displayed in mob. versions of the online store on wordpress?
- WooCommerce (Bookings) + AddOns not always calculating correctly the total
- Woocommerce order proceed hooks
- validation field form registration vendor dokan woocommerce
- Delete unpublished woocommerce products
- List of JS events in the WooCommerce frontend
- WooCommerce custom product type not saving with namespaces
- Woocommerce / Product Columns on Shop Loop / Responsive
- Redirecting orders by company field
- Upload file to Woocommerce Order
- WooCommerce Product Search box with 3 dropdown menus
- Split taxonomies on different pages
- woocommerce REST api on the website’s front-end
- How can I change field values of posts before displaying
- Display WOO Commerce products on HTML page?
- Editing fields required in the WooCommerce / WordPress registration form [closed]
- WC Booking query bookings with date ranges
- Show products as posts on archive page
- The orders in WooCommerce admin are hidden (they have the “hidden” CSS class)
- Disable theme WooCommerce template [closed]
- WooCommerce: how to set stock per attribute on variable product
- How to display products in sidebar in 2 columns?
- Replace “Add to cart” by a link to contact page on specific product
- Adding price to woocommerce cart item with get_price gets multiplied with 3?
- Increase load-out-page speed
- WooCommerce Stucked (?) – Edit dimensions
- Use Product Attribute in conditional tag
- How to add a fixed shopping cart button on the bottom of the page?
- How to Display Amount of products being displayed out of the amount in category – WordPress/Woocommerce
- Use a different catalog image than the featured image
- Echo SKU in WooCommerce Conformation page [closed]
- PHP Warning: Error while sending QUERY packet
- Add category description on product page (Woocommerce)
- Hide .woocommerce-price-suffix on the product list page
- Woocommerce cart displays outdated prices [closed]
- Adding Extra Customer Email In Woocommerce Checkout
- How to override email text New Customer Order?
- How do I create a array custom field for use with facetwp.com?
- How to add my theme’s style to woocommerce blocks?
- Get a customer’s phone number by woocommerce
- Insert a custom field as a second email address to a completed order in WooCommerce
- Want to add Number of Products added by each shop manager in users list
- Titles with thumbnails in media library
- Reposition variation stock message
- Woocommerce product not responsive
- limit all products
- Pricing Rules plugin bulk table not showing in varition of products (have 2 attributes) if single attribute its shows
- WooCommerce Webhook Action When a New Product Review was Submitted/Created