i have a problem with the add file when i try add file show this https://tinyurl.com/2yz2xash
Although the file is attached, it does not send the notification email with the link.
Please help me.
]]>Running wordpress 6.6.2 and php 8.1
when i try to activate the plugin give me the message “Plugin could not be activated because it triggered a fatal error”.
The log in wp-admin shows this:
PHP Fatal error: Uncaught Error: Call to undefined method Monolog\Formatter\LineFormatter::setDateFormat() in /home/domain/public_html/wp-content/plugins/order-attachments-for-woocommerce/src/WCOA/Utils/Logger.php:41
Stack trace: 0 /home/domain/public_html/wp-content/plugins/order-attachments-for-woocommerce/src/WCOA/Utils/Logger.php(31): DirectSoftware\WCOA\Utils\Logger->initialize() 1 /home/domain/public_html/wp-content/plugins/order-attachments-for-woocommerce/src/WCOA/Utils/Logger.php(22): DirectSoftware\WCOA\Utils\Logger->__construct() 2 /home/domain/public_html/wp-content/plugins/order-attachments-for-woocommerce/src/WCOA/Kernel.php(165): DirectSoftware\WCOA\Utils\Logger::getInstance() 3 /home/domain/public_html/wp-includes/class-wp-hook.php(324): DirectSoftware\WCOA\Kernel::activation_task(false) 4 /home/domain/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) 5 /home/domain/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 6 /home/domain/public_html/wp-admin/includes/plugin.php(703): do_action(‘activate_order-…’, false) 7 /home/domain/public_html/wp-admin/plugins.php(60): activate_plugin(‘order-attachmen…’, ‘https://domain…’, false) 8 {main}
thrown in /home/domain/public_html/wp-content/plugins/order-attachments-for-woocommerce/src/WCOA/Utils/Logger.php on line 41
Hope you can help me
]]>// Funktion zum Hinzufügen eines Anhangs zur Bestell-E-Mail
function add_attachment_to_order_email( $attachments, $status, $order ) {
// überprüfe, ob die Bestellung existiert
if ( ! $order instanceof WC_Order ) {
return $attachments;
}
// Hole den Dateinamen aus den Bestelldaten
$files = DirectSoftware\WCOA\Attachments\Attachment::get_all_by_order($order->get_id());
foreach($files as $file) {
$file_name = $file["guid"];
if ( $file_name ) {
$path = wp_upload_dir();
$file_path = str_replace($path["baseurl"],$path["basedir"],$file_name);
// Datei zum Anhang hinzufügen
if ( file_exists( $file_path ) ) {
$attachments[] = $file_path;
}
}
}
return $attachments;
}
// Hook in die WooCommerce E-Mail
add_filter( 'woocommerce_email_attachments', 'add_attachment_to_order_email', 10, 3 );
]]>
Hi,
Great plugin you created, but after the latest update i am experiencing some difficulties.
All my customers complain they can access their invoices via the attachments section on their “My account page”. All was working fine, now when the attachments link is cliked it simply reverts back to the “My account page”. I allready did some test and experience the same problem. Are you aware of this issue, is there any way to fix it??
Best regards
]]>Hey!
If I want to remove the plugin, I wonder if there’s a way to remove all the uploaded attachments?
]]>Hello!
Is there a way to add the file format extension to the email text? If I add two files with the same name with different format, I would like to option to display the extension, so customer knows which file they’re downloading
]]>Email sent to the customer don’t have link to the attachment.
It seams that “$attachment_url” is empty, this is the code i get in the email where “href” is empty:
<a class="button" href="" style="color: #146991; font-weight: normal; text-decoration: underline;">Preview</a>
Attachment is visible in client’s Frontend page (/my-account/wcoa-attachments/).
In admin everything works fine.
Email is where I noticed this issue.
]]>I’ve install the plug-in, but when I try to upload any file, it shows “Error 500 – error” as a message.
]]>I open order in backend and upload a PDF file, but the END-USER can not see this file.
Me as ADMIN, opened the Attachments?page (with admin login) and see all the attachments for all orders, but the end-user can not see this files.?=(
Can I missed some configuration? Why the end user can not see their respective order attachments?
Thanks for any help.
Hi, I have 2 questions: 1- Would it be possible to force the customer to log in before viewing the files? 2- For some reason the link to view the file sent by email does not work. Actually there is no hyperlink: https://prnt.sc/6nrmmDV3Arub
]]>Hello and thank you for your great plugin!
I think it would be beneficial to add a feature that allows the attachments of each order to be displayed based on the order status. For example, creating different conditional rules, such as showing the attachment file to the user only if the order status is “Completed”. You could also use an OR operator to define another condition, or use an ANY condition, meaning if any of the following conditions are met, the attachment should be displayed.
Thank you!
]]>Hello, and thank you for your great plugin.
I couldn’t find an option to remove an attached file from an order. Suppose the site admin accidentally attaches a file to an order; what should be done in that case?
Thank you.
]]>Hey There!
Thanks for this useful plugin!
Does this plugin have a shortcode so that we can display the list of attached files related to orders on the desired page.
Due to the use of a dedicated user panel and not using the default WooCommerce user panel, we cannot use the Endpoint URL settings and ultimately cannot display the attached files to the user.
Or if there is no special short code, is it possible to add it in the next updates?
Hello! Good day. Plugin was working great till the last update for me. It did never work for me unless I updated the code from “frontend-my-account-attachments.php” and that was working perfectly. I have this coded saved so when the plugin update, I replace the php and all keep working good. With this recent updated, I upload the code and gives me critical error on the website so now my code doesn’t work and it’s no displaying attachments at front
<?php
$wcoa_attachments = WCOA_Attachment::get_list(0, get_current_user_id());
if (!$wcoa_attachments || count($wcoa_attachments) === 0) {
_e('There are no attachments to display.', 'sld-wcoa');
return;
}
// Define an array mapping file extensions to their corresponding icon URLs
$file_icons = array(
'vp3' => 'https://abdigitizing.com/wp-content/uploads/2024/06/VP3.png',
'xxx' => 'https://abdigitizing.com/wp-content/uploads/2024/06/XXX.png',
'zip' => 'https://abdigitizing.com/wp-content/uploads/2024/06/ZIP.png',
'dst' => 'https://abdigitizing.com/wp-content/uploads/2024/06/DST.png',
'emb' => 'https://abdigitizing.com/wp-content/uploads/2024/06/EMB.png',
'exp' => 'https://abdigitizing.com/wp-content/uploads/2024/06/EXP.png',
'hus' => 'https://abdigitizing.com/wp-content/uploads/2024/06/HUS.png',
'jef' => 'https://abdigitizing.com/wp-content/uploads/2024/06/JEF.png',
'pdf' => 'https://abdigitizing.com/wp-content/uploads/2024/06/PDF.png',
'pes' => 'https://abdigitizing.com/wp-content/uploads/2024/06/PES.png',
);
echo '<h2>' . __('Order Attachments', 'woocommerce') . '</h2>';
echo '<table class="order-attachments">';
echo '<thead><tr><th>' . __('Icon', 'woocommerce') . '</th><th>' . __('File Name', 'woocommerce') . '</th><th>' . __('Order', 'woocommerce') . '</th><th class="date-column">' . __('Date', 'woocommerce') . '</th><th>' . __('Action', 'woocommerce') . '</th></tr></thead>';
echo '<tbody>';
foreach ($wcoa_attachments as $item) {
$wcoa_order = wc_get_order($item['order_id']);
$item['order_url'] = $wcoa_order->get_view_order_url();
$file_url = $item['guid'];
$file_name = basename($file_url);
$file_extension = strtolower(pathinfo($file_name, PATHINFO_EXTENSION));
$attachment_date = $item['post_date'];
// Check if the file extension has a corresponding icon URL
$file_icon = isset($file_icons[$file_extension]) ? $file_icons[$file_extension] : ''; // Add a default icon URL if needed
echo '<tr>';
echo '<td><img src="' . esc_url($file_icon) . '" alt="' . esc_attr($file_extension) . ' Icon" height="50px"></td>'; // Icon with 50px height
echo '<td>' . esc_html($file_name) . '</td>'; // File name column
echo '<td><a href="' . esc_url($item['order_url']) . '">#' . esc_html($item['order_id']) . '</a></td>';
echo '<td class="date-column">' . esc_html($attachment_date) . '</td>'; // Date column
echo '<td><a href="' . esc_url($file_url) . '" class="button" target="_blank" download>' . __('Download', 'woocommerce') . '</a></td>';
echo '</tr>';
}
echo '</tbody>';
echo '</table>';
?>
]]>
It’s giving me fatal error after I click on remove an attachment.
Fatal error:
There has been a critical error on this website. Please check your site admin email inbox for instructions.
]]>When I try to install and activate this plugin I get the message “Plugin could not be activated because it triggered a fatal error.” I haven’t used this plugin before, so I don’t know if it’s an issue with the recent update or if it is a compatibility issue. My website is running WordPress 6.6.1 and PHP 8.2.5.
]]>This is really good plugin, I wonder the Last update was in 7 months ago.
Have you abandoned the development of this plugin?
Thanks
]]>Do you have or plan to have multi attachment in admin section in the future? something like drag and drop multiple files to an order?
]]>Hi,
I have a problem.
The files are visible only in the administrator account.
If I add a file to a new order with a new client, the file is not visible in the account.
But instead the file is displayed in the administrator account, where it shouldn’t be.
Can you help me?
Thank you
I am using wodpress 6.5.5
It looks as though the order attachments are uploaded to the ‘uploads’ directory in WordPress. How secure is this, as some attachments for orders could contain sensitive information? If files are in the media folder, could Google be indexing them, for example?
]]>Hello! I would like to know if it’s possible to add by snippets to have this feature on frontend attachments. I think it would be amazing to show the Name of the attachment in the front end. Can someone help? oh an also center the action bottom
]]>Plugin does not work. My Account Tab shows: “There are no attachments to display” although attachement has been uploaded…
]]>To fix the problem, go to the path
wp-content >plugins >order-attachments-for-woocommerce >templates >frontend >frontend-my-account-attachments.php
Replace all the code in this file and save it will work great
<?php
$wcoa_attachments = WCOA_Attachment::get_list(0, get_current_user_id() );
if (!$wcoa_attachments || count($wcoa_attachments) === 0)
{
_e('There are no attachments to display.', 'sld-wcoa');
return;
}
?>
<table>
<thead>
<tr>
<th><?php _e('Order', 'woocommerce'); ?></th>
<th><?php _e('Date'); ?></th>
<th><?php _e('Actions'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($wcoa_attachments as $item ) {
$wcoa_order = wc_get_order($item['order_id']);
$item['order_url'] = $wcoa_order->get_view_order_url();
?>
<tr>
<td> <a href="<?php print $item['order_url']; ?>" >#<?php print $item['order_id']; ?></a> </td>
<td><?php print $item['post_date']; ?></td>
<td><a target="_blank" href="<?php print $item['guid']; ?>" class="button"><?php _e('View'); ?></a></td>
</tr>
<?php } ?>
</tbody>
</table>
Copy this code and put it in the file frontend-my-account-attachments.php
]]>I updated the plugin 1 month ago, but the “Attachment” tab in My Account page still showing page not show attachments display (my-account/wcoa-attachments/)
or if someone here can share a fix?
Noted : i can try fix update permalink and repeating install , clear cache but can’t work
help me please!
]]>The plugin works well on the issue of emails with attachments, but the “My Account” page is not displaying the attachments
]]>Hello,
The attacahments not showing on attachment page. kindly fix the plugin.
Thanks in advance
]]>
Hi, backend side, the plugin works correctly, except that when the user receives the email and clicks on the link to view the attachment, the link opens the website and not the attachment.
Can you help me ?
Hi,
The latest updates make all the attachment cannot be viewed from the my-account page.
I have to revert to previous version to make it work again.
Please check yea..
Thank you.
]]>Hi,
After Update Order Attachments for WooCommerce Plugin not working,
Any suggetion ?
Thanks
]]>Please fix this:
Order data storage
??1 Incompatible plugin detected (Order Attachments for WooCommerce).
View and manage
Enable compatibility mode (synchronizes orders to the posts table).
]]>