• CoBu1

    (@cobu1)


    When I change my post status to a custom post status, the only option I have is to “Publish”. But I don’t want to Publish, I just want to update the post status.

    Here are my custom statuses:

    function ls_create_time_card_statuses() {
    
    	register_post_status( 'order-received', array(
    		'label'                     => _x( 'Order Received', 'post' ),
    		'public'                    => false,
    		'exclude_from_search'       => true,
    		'show_in_admin_all_list'    => true,
    		'show_in_admin_status_list' => true,
    		'label_count'               => _n_noop( 'Order Received <span class="count">(%s)</span>', 'Order Received <span class="count">(%s)</span>' ),
    	) );
    
    	register_post_status( 'order-assigned', array(
    		'label'                     => _x( 'Order Assigned', 'post' ),
    		'public'                    => true,
    		'exclude_from_search'       => true,
    		'show_in_admin_all_list'    => true,
    		'show_in_admin_status_list' => true,
    		'label_count'               => _n_noop( 'Order Assigned <span class="count">(%s)</span>', 'Order Assigned <span class="count">(%s)</span>' ),
    	) );
    
    	register_post_status( 'waiting-for-signature', array(
    		'label'                     => _x( 'Waiting for Signature', 'post' ),
    		'public'                    => true,
    		'exclude_from_search'       => true,
    		'show_in_admin_all_list'    => true,
    		'show_in_admin_status_list' => true,
    		'label_count'               => _n_noop( 'Waiting for Signature <span class="count">(%s)</span>', 'Waiting for Signature <span class="count">(%s)</span>' ),
    	) );
    
    }
    
    add_action( 'init', 'ls_create_time_card_statuses' );
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Try using the ‘post_submitbox_misc_actions’ action instead of ‘init’, that is the recommended hook. I don’t know if it’ll help or not, but worth a try.

    Is this just a label issue? Does the post update when you “Publish”, or is the problem deeper?

Viewing 1 replies (of 1 total)
  • The topic ‘Can't update custom post status’ is closed to new replies.