Solved the problem of attachments not appearing in the My Account tab
-
To fix the problem, go to the path
wp-content >plugins >order-attachments-for-woocommerce >templates >frontend >frontend-my-account-attachments.phpReplace 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
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.