• Resolved xian06

    (@xian06)


    Hi,

    I have added this code to my functions.php but it brakes my site:

    <?php // don't add this line since it's already in your functions.php file
    function _si_information_meta_box_args( $args ) {
    	if ( 'auto-draft' == $args['post']->post_status ) { // only adjust drafts
    		$args['status'] = 'publish'; // same as SI_Invoice::STATUS_PENDING and SI_Estimate::STATUS_PENDING
    	}
    	return $args;
    }
    add_filter( 'load_view_args_admin/meta-boxes/invoices/information.php', '_si_information_meta_box_args' );
    add_filter( 'load_view_args_admin/meta-boxes/estimates/information.php', '_si_information_meta_box_args' );
    

    Any help is greatly appreciated.

    Thank you,

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Dan Cameron

    (@dancameron)

    Hello,

    What is the specific php error that is breaking your site?

    Did you not include the “<?php” line within your functions.php file? You file should already start out with this.

    Hope it’s an easy fix.

    Regards,

    Thread Starter xian06

    (@xian06)

    yes the open tag is present. There is no error that displays or is logged.

    It simply makes my site blank white pages.

    I have a feeling it is these 2 filters that is causing my issue as i am already using the invoice filter from another function script for default template.

    add_filter( 'load_view_args_admin/meta-boxes/invoices/information.php', '_si_information_meta_box_args' );
    add_filter( 'load_view_args_admin/meta-boxes/estimates/information.php', '_si_information_meta_box_args' );

    Thank you,

    Plugin Contributor Dan Cameron

    (@dancameron)

    Hello,

    PHP should provide a fatal error. You may want to talk to your host if you need help finding what the error may be.

    Regards,

    Thread Starter xian06

    (@xian06)

    Well I turned WP_DEBUG on and now I am receiving a HTTP ERROR 500

    I cannot get any error to log/show all it does is the dreadful WordPress blank white site pages.

    Thanks Again,

    Plugin Contributor Dan Cameron

    (@dancameron)

    Please open a support ticket with your host and ask about what PHP error is given when your web server is producing the 500 error.

    Let me know the results and hopefully I can help.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Default Status to Pending NOT Working’ is closed to new replies.