WC_Meta_Box_Order_Actions::output()
Output the metabox.
Метод класса: WC_Meta_Box_Order_Actions{}
Хуки из метода
Возвращает
null
. Ничего (null).
Использование
$result = WC_Meta_Box_Order_Actions::output( $post );
Код WC_Meta_Box_Order_Actions::output() WC Meta Box Order Actions::output WC 8.7.0
<?php public static function output( $post ) { global $theorder; OrderUtil::init_theorder_object( $post ); $order = $theorder; $order_id = $order->get_id(); $order_actions = self::get_available_order_actions_for_order( $order ); ?> <ul class="order_actions submitbox"> <?php /** * Fires at the start of order actions meta box rendering. * * @since 2.1.0 */ do_action( 'woocommerce_order_actions_start', $order_id ); ?> <li class="wide" id="actions"> <select name="wc_order_action"> <option value=""><?php esc_html_e( 'Choose an action...', 'woocommerce' ); ?></option> <?php foreach ( $order_actions as $action => $title ) { ?> <option value="<?php echo esc_attr( $action ); ?>"><?php echo esc_html( $title ); ?></option> <?php } ?> </select> <button class="button wc-reload"><span><?php esc_html_e( 'Apply', 'woocommerce' ); ?></span></button> </li> <li class="wide"> <div id="delete-action"> <?php if ( current_user_can( 'delete_post', $order_id ) ) { if ( ! EMPTY_TRASH_DAYS ) { $delete_text = __( 'Delete permanently', 'woocommerce' ); } else { $delete_text = __( 'Move to Trash', 'woocommerce' ); } ?> <a class="submitdelete deletion" href="<?php echo esc_url( self::get_trash_or_delete_order_link( $order_id ) ); ?>"><?php echo esc_html( $delete_text ); ?></a> <?php } ?> </div> <button type="submit" class="button save_order button-primary" name="save" value="<?php echo 'auto-draft' === $order->get_status() ? esc_attr__( 'Create', 'woocommerce' ) : esc_attr__( 'Update', 'woocommerce' ); ?>"><?php echo 'auto-draft' === $order->get_status() ? esc_html__( 'Create', 'woocommerce' ) : esc_html__( 'Update', 'woocommerce' ); ?></button> </li> <?php /** * Fires at the end of order actions meta box rendering. * * @since 2.1.0 */ do_action( 'woocommerce_order_actions_end', $order_id ); ?> </ul> <?php }