Last active
June 27, 2022 17:11
-
-
Save grantalltodavid/855cc6cc258c6e0af009fabbf5071d0f to your computer and use it in GitHub Desktop.
Sliced Invoices: redirect to newly created Invoice immediately upon Quote acceptance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'sliced_client_accepted_quote', 'si20220627_custom_quote_acceptance_action', 20, 2 ); | |
function si20220627_custom_quote_acceptance_action( $id, $new_post_id ) { | |
$invoice_id = $new_post_id ? $new_post_id : $id; | |
if ( $invoice_id ) { | |
if ( wp_redirect( get_permalink( $invoice_id ) ) ) { | |
exit; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment