Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 3 replies, has 2 voices.

Last updated by Osama Mersal 1 year, 8 months ago.

Assisted by: Osama Mersal.

Author Posts
October 17, 2023 at 11:41 am #14593611

andrejO

Hello,

we need to show product price in admin table in different currencies. For example default show currency in euro, but we need to show admin column with price in CZK.

We try to get id of translated product a the call get price:
$target_language_code = 'cs'; // Replace with the desired language code
$translated_product_id = apply_filters('wpml_object_id', $post_id, 'product', true, $target_language_code);
$cz_product = wc_get_product( $translated_product_id );
$cz_price = $cz_product->get_price_html();

But this is not working.

Thanks for reply

October 18, 2023 at 8:11 am #14599809

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

I'm afraid that we don't support custom coding according to our support policy. Kindly check our support policy here. (https://wpml.org/purchase/support-policy/)

Please check out the contractor's directory if you need professional help regarding this issue. (https://wpml.org/contractors/)

Best regards,
Osama

October 23, 2023 at 12:26 pm #14637999

andrejO

Hello,

I think this is not an issue of custom coding, because I am reproducing steps from your docs https://wpml.org/wcml-hook/wcml_product_price_by_currency/ and it is not working in admin. Yes, it is noted in docs that it is working only on the front-end, but I think this is useful also in admin and WPML should support this. Can you help me to find a solution similar to wpml filter?

Thanks for reply.

October 23, 2023 at 12:31 pm #14638043

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

This hook only works on the front end, and we don't have another one for the backend because you can check it from the product's edit screen.
However, in order to achieve what you want, you will need a custom code/function.

I'm afraid we don't have or provide such a function, so you need to hire a contractor to write it for you.

Sorry for the inconvenience

Best regards,
Osama