Order quick preview buttons
-
Hi , i want to disable buttons for status change on order quick preview (eye icon). I know 2 ways of doing that :
.wc-order-preview footer .wc-action-button-group { display:none; }
OR
add_filter( 'woocommerce_admin_order_preview_actions', 'filter_admin_order_preview_actions', 10, 2 ); function filter_admin_order_preview_actions( $actions, $order ) { $actions = array(); $status_actions = array(); if ( $status_actions ) { $actions['status'] = array( 'group' => __( 'Change status: ', 'woocommerce' ), 'actions' => $status_actions, ); } return $actions; }
My question is : which method is better of doing that? Just hidding with css or overriding woocommerce_admin_order_preview_actions in functions .php?
Is that snippet above even correct way or doing that?
Both ways are working, i am just wondering which is better/more elegant/performance wise solution.
Greetings
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Order quick preview buttons’ is closed to new replies.