We are using 3rd party plugin for invoice generation which fits for the local law.
If you can send me direction how to get the product name regarding the order "language", I would be very happy.
I have run a round with the developers of the invoice plugin and they send me the following snippet:
foreach ( $order->get_items() as $item_id => $item ) {
// Get the product object
$product = wc_get_product( $product_id );
$paramt[$counter]['product_name'] = "".htmlspecialchars($product->get_name())."";
$paramt[$counter]['quantity'] = $item->get_quantity();
So if you can send me a direction how to get the language (en, de, ro, hu) for the order and get the product name regarding it, I would be very happy because they will implement it.
I require further clarification on the functionality of the custom plugin regarding invoice generation. Could you provide a detailed scenario illustrating how it operates? This information is necessary for me to compose a report for our 2nd Tier Support team, who will then be able to offer additional guidance and assistance.
Furthermore, please be aware that custom programming falls outside the realm of our standard support services. Nevertheless, we remain committed to doing everything within our capacity to aid you in this matter.
Sorry to say that in the past it worked as I mentioned. I can provide you evidence regarding this, but not in public.
Colud you please open me a private chanel where I can upload the evidence?
Upon reviewing the screenshot you provided, could you please clarify how this invoice is generated? Is it custom coded somewhere on the site? I need to understand the process before I can escalate this to our 2nd Tier Support to explore the possibilities of achieving your requirements.
It is a plugin called by the shop manager inside the order edit page which goes thru the order items inside the order and create an XML then send the names, prices, SKUs via an API call to the invoice system where the invoice generating from the received data. So the invoice system does not store the name of the products either the price.
It seems that after April of 2013 an update changed the way how the product name appears to the shop manager.
I have already sent the code snippet.
Would you mind providing access to your website and guiding me through the functionality of the "Shop Manager" plugin, as well as indicating where I can find the code snippet responsible for generating the invoice? Subsequently, I'll pass this information along to our 2nd Tier Support for further insights.
Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.
Your upcoming reply will be treated with confidentiality and will only be visible to you and me.
✙ I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.
I can see the custom PHP code in cmfx-woo-intigration/includes/cmfx.php line 376 . One more question before I can forward this report to our 2nd Tier Support. Where can I view the invoices? I don't see any buttons here hidden link to generate it.
It is there, called "Számlakészítés", attached screenshot.
As your support more then slowly (like a snake), I made some search and found that it is worked fine for most of the users before 2023.04., a lot of user face with the same problem.
What I have found that the invoice team can query the language/site of the order with:
get_post_meta($order_id, 'wpml_language', true);
Now we are looking for how we can get the product name in the proper language as the table "wp_woocommerce_order_items" contains the wrong language of the items.
I've reviewed the order you mentioned at hidden link, and when clicking on the "Számlakészítés" button, it displays the following message: "HIBA:057 Nincs ilyen cikkszám: 101593hiba:" as shown in the attached screenshot
How can I proceed to generate the invoice? Additionally, I want to inform you that this pertains to custom programming work, which falls outside the scope of our standard support. I'm in the process of escalating this to our 2nd Tier Support in hopes that they can investigate further and potentially provide assistance if the issue doesn't require extensive customization.
I have setup for the testing invoice system, so you can create it now.
I do not need any custom programming from your side!
I just need to fix it as it worked before.
So the order should contains the product name in the foreign language as before, see the evidences what I have sent, but I can send you a lot of more from the past years.
What I have found when looking around in the forums that the table called "wp_woocommerce_order_items" should contains the proper product name, but right now it is not true on my site.
Our 2nd Tier Support shared the custom PHP code below and could you please try adding the code to your code to see if it helps? Also, try configuring the WPML > Language > Make themes work in multi-languages Option.
global $sitepress;
remove_filter(
'get_pages',
[ $sitepress, 'get_pages_adjust_ids' ],
1
);
The topic ‘[Feature Request] get the product name of the order language for invoicing plugin’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.