From e468663d15d833a7d220553a5db5dd3772d13d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lys=C3=BD?= Date: Fri, 30 Jul 2021 10:38:17 +0200 Subject: [PATCH] Add job_listing into supported post types for forms [MAILPOET-3639] --- lib/Form/DisplayFormInWPContent.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Form/DisplayFormInWPContent.php b/lib/Form/DisplayFormInWPContent.php index 95d3d8b3e1..8861f966c6 100644 --- a/lib/Form/DisplayFormInWPContent.php +++ b/lib/Form/DisplayFormInWPContent.php @@ -19,6 +19,12 @@ class DisplayFormInWPContent { FormEntity::DISPLAY_TYPE_SLIDE_IN, ]; + const SUPPORTED_POST_TYPES = [ + 'post', + 'product', + 'job_listing', + ]; + /** @var WPFunctions */ private $wp; @@ -187,7 +193,7 @@ class DisplayFormInWPContent { return false; } - if ($this->wp->isSingular('post') || $this->wp->isSingular('product')) { + if ($this->wp->isSingular(self::SUPPORTED_POST_TYPES)) { if ($this->shouldDisplayFormOnPost($setup, 'posts')) return true; if ($this->shouldDisplayFormOnCategory($setup)) return true; if ($this->shouldDisplayFormOnTag($setup)) return true;