Hi @mschnyde,
Thank you for sharing your requirement along with the screenshot.
I will ask about your request to our development team and will get back to you with an update on the same.
Hi @mschnyde,
Currently, WooCommerce does not provide a built-in filter or setting to change the position of the “Print” button on the Order Received page. The button is added as part of WooCommerce’s default formatting and handling, which limits direct customization of its placement.
However, as a workaround, we can achieve the desired positioning by using custom JavaScript. Our developer has prepared a sample code snippet that moves the “Print” button below the “Actions” heading, which you can implement on your site. Please note that this code is provided as a reference, and you might need to adjust it further to match your theme’s specific structure.
Here is the custom code:
add_action( 'wp_footer', 'move_print_button_below_action_heading' );
function move_print_button_below_action_heading() {
if ( ! is_wc_endpoint_url( 'order-received' ) ) {
return;
}
?>
<script type="text/javascript">
jQuery(function($){
var $heading = $('th.order-actions--heading');
if(!$heading.length) { return; }
var $row = $heading.closest('tr');
var $btn = $row.find('td a.woocommerce-button.print');
if ($btn.length) {
var $oldCell = $btn.closest('td');
// Create a new tr underneath to hold the button
var $newRow = $('<tr class="print-row"><td></td><td></td></tr>');
$newRow.find('td:first').append($btn); // put button into FIRST <td>
$row.after($newRow);
$oldCell.remove(); // remove original location
}
});
</script>
<style>
.print-row td {
padding-left: 0 !important;
text-align: left !important;
}
.print-row td:first-child {
padding-left: 20px !important; /* move to the right, adjust as needed */
}
</style>
<?php
}
Output: https://prnt.sc/UZQgv8CUQEiP
Kindly add this custom code to the “functions.php” file of your currently active theme. Please note, if you wish to customize the positioning further, you may need to add or modify theme-specific CSS or JavaScript accordingly.
Please check and let us know if it helps to achieve your requirements.
Hi @mschnyde,
You’re welcome! I’m glad to hear that it works.
If you need any further assistance or have additional questions, feel free to reach out.
If you like our service, then I would appreciate it if you could take a moment to review us on our plugin’s review page. That would be fantastic. 🙂