Skip to content

Commit 370cb94

Browse files
authored
Merge pull request #148 from TycheSoftwares/issue-147
Added filters so that one can change the options name in the bulk action dropdown
2 parents 9e04139 + 42ffcb1 commit 370cb94

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,12 @@ public function add_listing_actions( $order ) {
118118
* @param array $bulk_actions Array of the list in dropdown.
119119
*/
120120
public function register_my_bulk_actions( $bulk_actions ) {
121-
$bulk_actions['wcdn_print_invoice'] = __( 'Print Invoice', 'woocommerce-delivery-notes' );
122-
$bulk_actions['wcdn_print_delivery-note'] = __( 'Print Delivery Note', 'woocommerce-delivery-notes' );
123-
$bulk_actions['wcdn_print_receipt'] = __( 'Print Receipt', 'woocommerce-delivery-notes' );
121+
$print_invoice_label = apply_filters( 'wcdn_change_text_of_print_invoice_in_bulk_option', 'Print Invoice' );
122+
$print_delivery_note_label = apply_filters( 'wcdn_change_text_of_print_delivery_note_in_bulk_option', 'Print Delivery Note' );
123+
$print_receipt_label = apply_filters( 'wcdn_change_text_of_print_receipt_in_bulk_option', 'Print Receipt' );
124+
$bulk_actions['wcdn_print_invoice'] = wp_kses_post( $print_invoice_label, 'woocommerce-delivery-notes' );
125+
$bulk_actions['wcdn_print_delivery-note'] = wp_kses_post( $print_delivery_note_label, 'woocommerce-delivery-notes' );
126+
$bulk_actions['wcdn_print_receipt'] = wp_kses_post( $print_receipt_label, 'woocommerce-delivery-notes' );
124127
return $bulk_actions;
125128
}
126129

0 commit comments

Comments
 (0)