-7

I recently started a WooCommerce project for a photographer client. I installed the commercial WooCommerce Photography extension and the Product Add-Ons extension. The client wants to add the product image title (filename) to the name of the product. Is there a way to do it somehow?

The WooCommerce Photography extension creates individual products from the photos you upload. Every product has one photo as a product image.

Basically, what I want to achieve is to show the filename of the main product image inside the name of the generated product. As long as I have it in the order details page, I am good. Anyone with a similar experience?

vsapountzis
  • 618
  • 3
  • 11
  • 28
  • 6
    Your question has probably not received enough attention because there's currently no evidence you've attempted to solve the problem yourself. Right now it looks like a scope for a paid job. I'd advise editing your question with the code you've written so far. – James Jones May 16 '18 at 04:50

1 Answers1

0

Ok. Based on what I have understood from your question, following might be the solution for your problem.

First get featured image url. Ref: How to get featured image of a product in woocommerce

Now use this URL to get filename. Ref: https://gist.github.com/wooki/2709106

Once you get filename, you can echo it wherever needed or you can use this all in single-product template or order-details template.

Hope this helps.

Sushant Tayade
  • 122
  • 4
  • 17