Okay, entferne das mit dem do_action wieder. Wir führen einen neuen Status ein:
Nach
$order = new WC_Order( $order_id ); im Plugin fügst Du ein:
PHP Alles anzeigenfunction hardcopy_order_status() { register_post_status( 'hardcopy', array( 'label' => 'Hardcopy', 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop( 'Hardcopy <span class="count">(%s)</span>', 'Hardcopy <span class="count">(%s)</span>' ) ) ); } add_action( 'init', 'hardcopy_order_status' ); function add_hardcopy_order_status( $order_statuses ) { $new_order_statuses = array(); // add new order status after processing foreach ( $order_statuses as $key => $status ) { $new_order_statuses[ $key ] = $status; if ( 'wc-processing' === $key ) { $new_order_statuses['hardcopy'] = 'Hardcopy'; } } return $new_order_statuses; } add_filter( 'wc_order_statuses', 'add_order_hardcopy_status' );Gibt es jetzt den neuen Status "Hardcopy" im Backend?
:-(
Code
[B]Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'add_order_hardcopy_status' not found or invalid function name in [B]/var/www/web28596838/html/freiheitenwelt.de/wordpress/wp-includes/class-wp-hook.php on line [B]286
[B]Warning: array_keys() expects parameter 1 to be array, null given in [B]/var/www/web28596838/html/freiheitenwelt.de/wordpress/wp-content/plugins/woocommerce/includes/class-wc-order-query.php on line [B]25[/B][/B][/B][/B][/B][/B]