PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 3.6.0
GiveWP – Donation Plugin and Fundraising Platform v3.6.0
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
← All changes | src/Controller/Form.php +3 -7 4.16.03.6.0 View file →
@@ -61,9 +61,8 @@
61 61
62 62 /**
63 63 * Load receipt view.
64 64 *
65 - * @since 3.16.0 add action give_donation_confirmation_page_enqueue_scripts
66 65 * @since 2.7.0
67 66 */
68 67 public function loadReceiptView()
69 68 {
@@ -71,10 +70,8 @@
71 70 if (FormUtils::isLegacyForm()) {
72 71 return;
73 72 }
74 73
75 - do_action('give_donation_confirmation_page_enqueue_scripts');
76 -
77 74 // Handle success page.
78 75 if (FormUtils::isViewingFormReceipt() && ! FormUtils::isLegacyForm()) {
79 76 /* @var Template $formTemplate */
80 77 $formTemplate = Give()->templates->getTemplate();
@@ -115,8 +112,9 @@
115 112 // Render receipt with in iframe.
116 113 include $formTemplate->getReceiptView();
117 114 exit();
118 115 }
116 +
119 117 // Render receipt on success page in iframe.
120 118 add_filter('the_content', [$this, 'showReceiptInIframeOnSuccessPage'], 1);
121 119 }
122 120 }
@@ -165,9 +163,8 @@
165 163
166 164 /**
167 165 * Handle receipt shortcode on success page
168 166 *
169 - * @since 3.16.0 add filter give_donation_confirmation_success_page_shortcode_view
170 167 * @since 2.7.0
171 168 *
172 169 * @param string $content
173 170 *
@@ -175,12 +172,11 @@
175 172 */
176 173 public function showReceiptInIframeOnSuccessPage($content)
177 174 {
178 175 $receiptShortcode = ShortcodeUtils::getReceiptShortcodeFromConfirmationPage();
176 + $content = str_replace($receiptShortcode, give_form_shortcode([]), $content);
179 177
180 - $view = apply_filters('give_donation_confirmation_success_page_shortcode_view', give_form_shortcode([]));
181 -
182 - return str_replace($receiptShortcode, $view, $content);
178 + return $content;
183 179 }
184 180
185 181 /**
186 182 * Load form template