Skip to content

Commit bee31c3

Browse files
authored
Fix bulk action handling incompatibility
"handle_bulk_actions-edit-shop_order" is a filter, which should return a value, not just null, because other plugins might customized it already. This causes issues, like showing a white screen instead of handling the bulk action.
1 parent 4a6b5fe commit bee31c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

includes/class-wcdn-writepanel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ public function register_my_bulk_actions( $bulk_actions ) {
134134
public function my_bulk_action_handler( $redirect_to, $doaction, $post_ids ) {
135135
// stop if there are no post ids.
136136
if ( ! isset( $_REQUEST['post'] ) ) {
137-
return;
137+
return $redirect_to;
138138
}
139139
// stop if the action is not of bulk printing.
140140
if( ! in_array( $_REQUEST['action'], array( 'wcdn_print_invoice', 'wcdn_print_delivery-note', 'wcdn_print_receipt' ) ) ) {
141-
return;
141+
return $redirect_to;
142142
}
143143
// only for specified actions.
144144
foreach ( WCDN_Print::$template_registrations as $template_registration ) {
@@ -149,15 +149,15 @@ public function my_bulk_action_handler( $redirect_to, $doaction, $post_ids ) {
149149
}
150150
}
151151
if ( ! isset( $report_action ) ) {
152-
return;
152+
return $redirect_to;
153153
}
154154

155155
// security check.
156156
check_admin_referer( 'bulk-posts' );
157157

158158
// get referrer.
159159
if ( ! wp_get_referer() ) {
160-
return;
160+
return $redirect_to;
161161
}
162162

163163
// filter the referer args.

0 commit comments

Comments
 (0)