Skip to content

Commit f882dd3

Browse files
committed
Don't attempt template overrides for auto-drafts
Just in case.
1 parent 9c3a706 commit f882dd3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

classes/class-cpt-wplf-form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ class="code"
477477
* @return void
478478
*/
479479
function maybe_load_imported_template( $post_type, $post ) {
480-
if ( $post_type !== 'wplf-form' ) {
480+
if ( $post_type !== 'wplf-form' || $post->post_status === 'auto-draft' ) {
481481
return;
482482
}
483483

0 commit comments

Comments
 (0)