pierret76
Forum Replies Created
-
Yes, the problem happened because I was using the
woocommerce_order_item_namefilter to display the product image next to the product title in the checkout page like this :add_filter('woocommerce_order_item_name', 'add_product_image_to_orderpay', 9999, 3);
function add_product_image_to_orderpay($name, $item, $extra): string
{
if (!is_checkout()) {
return $name;
}
$product_id = $item->get_product_id();
$product = wc_get_product($product_id);
$thumbnail = $product->get_image();
$image = '<div class="product_image_orderpay" style="width: 50px; height: 50px; vertical-align: middle;">'
. $thumbnail .
'</div>';
return $image . $name;
}And as you can see I had a condition to do this only in the checkout page but I think the
is_checkout()was not available during the invoice generation of the plugin. I moved my condition around theadd_filter()method and the problem was resolved. Final code :if (is_checkout()) {
add_filter('woocommerce_order_item_name', 'add_product_image_to_orderpay', 9999, 3);
}
function add_product_image_to_orderpay($name, $item, $extra): string
{
$product_id = $item->get_product_id();
$product = wc_get_product($product_id);
$thumbnail = $product->get_image();
$image = '<div class="product_image_orderpay" style="width: 50px; height: 50px; vertical-align: middle;">'
. $thumbnail .
'</div>';
return $image . $name;
}- This reply was modified 1 year, 5 months ago by pierret76.
Hello @yordansoares
I already tried to update the plugin to its latest version but it didn’t change anything.
I have found what was the problem after investigating how the plugin code works. I started looking at the Invoice.php file located in templates/Simple folder and I noticed that the invoice data was retrieved with the get_order_items() method located in includes/Documents/OrderDocumentMethods.php.
In this method I saw that the product name was retrieved with this code :
// Set item name
$data['name'] = apply_filters( 'woocommerce_order_item_name', $item['name'], $item, false);And after seeing this I remembered that I use this filter too and that was this method which caused the bug.
Hope it will help someone.
Best regards !
The plugin is in 3.9.3 version. I don’t know if the bug is due to an update because the auto-updates of the plugin were activated.
- This reply was modified 1 year, 5 months ago by pierret76.
Hi @yordansoares,
Here is the details of the #2019 order :

- This reply was modified 1 year, 5 months ago by pierret76.
Forum: Plugins
In reply to: [Gallery with thumbnail slider] Cannot upload gallery imagesForum: Plugins
In reply to: [Flow-Flow Social Feed Stream] Facebook Feed not workingHello,
I have the exact same problem than @mylenep. Since last friday I cannot connect my account in “Auth” tab, I have the error “Error occurred. Connection timed out after 5000 milliseconds”. I cannot connect my Facebook feed too.
I anyone have a solution it would be great !
Thanks by advance.
Forum: Plugins
In reply to: [WP-Members Membership Plugin] Change CSV export separatorsHi Chad,
Thanks for your answer and adding this new feature ! I think it will be very useful for some people.
I will overwrite the file while waiting for the new release to come out.
Have a good day.