Skip to content

Commit 4387519

Browse files
authored
Merge pull request #195 from TycheSoftwares/issue-153
issue-153
2 parents 9756932 + d0de706 commit 4387519

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed

woocommerce-delivery-notes/includes/class-wcdn-settings.php

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,20 +222,20 @@ public function get_settings( $section = '' ) {
222222
),
223223

224224
array(
225-
'title' => __( 'Email', 'woocommerce-delivery-notes' ),
226-
'desc' => __( 'Show print link in customer emails', 'woocommerce-delivery-notes' ),
227-
'id' => 'wcdn_email_print_link',
228-
'default' => 'no',
229-
'type' => 'checkbox',
225+
'title' => __( 'Email', 'woocommerce-delivery-notes' ),
226+
'desc' => __( 'Show print link in customer emails', 'woocommerce-delivery-notes' ),
227+
'id' => 'wcdn_email_print_link',
228+
'default' => 'no',
229+
'type' => 'checkbox',
230230
'checkboxgroup' => 'start',
231231
),
232232

233233
array(
234-
'desc' => __( 'Show print link in Admin emails', 'woocommerce-delivery-notes' ),
235-
'id' => 'wcdn_admin_email_print_link',
236-
'default' => 'no',
237-
'type' => 'checkbox',
238-
'desc_tip' => __( 'This includes the emails for a new, processing and completed order. On top of that the customer and admin invoice emails will also include the link.', 'woocommerce-delivery-notes' ),
234+
'desc' => __( 'Show print link in Admin emails', 'woocommerce-delivery-notes' ),
235+
'id' => 'wcdn_admin_email_print_link',
236+
'default' => 'no',
237+
'type' => 'checkbox',
238+
'desc_tip' => __( 'This includes the emails for a new, processing and completed order. On top of that the customer and admin invoice emails will also include the link.', 'woocommerce-delivery-notes' ),
239239
'checkboxgroup' => 'end',
240240
),
241241

@@ -256,6 +256,14 @@ public function get_settings( $section = '' ) {
256256
'checkboxgroup' => 'end',
257257
),
258258

259+
array(
260+
'title' => __( 'Text Direction', 'woocommerce-delivery-notes' ),
261+
'desc' => __( 'Print Text from Right to left', 'woocommerce-delivery-notes' ),
262+
'id' => 'wcdn_rtl_invoice',
263+
'default' => 'no',
264+
'type' => 'checkbox',
265+
'desc_tip' => __( 'Show text in right to left direction in Invoice, Print Receipt & Delivery note if you are using languages such as Hebrew, Arabic, etc.', 'woocommerce-delivery-notes' ),
266+
),
259267
array(
260268
'type' => 'sectionend',
261269
'id' => 'display_options',

woocommerce-delivery-notes/templates/print-order/print-header.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,25 @@
2020
<?php
2121
// wcdn_head hook.
2222
do_action( 'wcdn_head' );
23+
if ( 'yes' === get_option( 'wcdn_rtl_invoice', 'no' ) ) {
24+
?>
25+
<style>
26+
body {
27+
direction: rtl;
28+
}
29+
.order-items dt,
30+
.order-items dd {
31+
float: right;
32+
}
33+
.content{
34+
text-align:right;
35+
}
36+
th {
37+
text-align:right;
38+
}
39+
</style>
40+
<?php
41+
}
2342
?>
2443
</head>
2544

0 commit comments

Comments
 (0)