PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 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 All 255 releases
← All changes | src/Controller/Form.php +7 -3 2.30.04.16.9 View file →
@@ -61,8 +61,9 @@
61 61
62 62 /**
63 63 * Load receipt view.
64 64 *
65 + * @since 3.16.0 add action give_donation_confirmation_page_enqueue_scripts
65 66 * @since 2.7.0
66 67 */
67 68 public function loadReceiptView()
68 69 {
@@ -70,8 +71,10 @@
70 71 if (FormUtils::isLegacyForm()) {
71 72 return;
72 73 }
73 74
75 + do_action('give_donation_confirmation_page_enqueue_scripts');
76 +
74 77 // Handle success page.
75 78 if (FormUtils::isViewingFormReceipt() && ! FormUtils::isLegacyForm()) {
76 79 /* @var Template $formTemplate */
77 80 $formTemplate = Give()->templates->getTemplate();
@@ -112,9 +115,8 @@
112 115 // Render receipt with in iframe.
113 116 include $formTemplate->getReceiptView();
114 117 exit();
115 118 }
116 -
117 119 // Render receipt on success page in iframe.
118 120 add_filter('the_content', [$this, 'showReceiptInIframeOnSuccessPage'], 1);
119 121 }
120 122 }
@@ -163,8 +165,9 @@
163 165
164 166 /**
165 167 * Handle receipt shortcode on success page
166 168 *
169 + * @since 3.16.0 add filter give_donation_confirmation_success_page_shortcode_view
167 170 * @since 2.7.0
168 171 *
169 172 * @param string $content
170 173 *
@@ -172,11 +175,12 @@
172 175 */
173 176 public function showReceiptInIframeOnSuccessPage($content)
174 177 {
175 178 $receiptShortcode = ShortcodeUtils::getReceiptShortcodeFromConfirmationPage();
176 - $content = str_replace($receiptShortcode, give_form_shortcode([]), $content);
177 179
178 - return $content;
180 + $view = apply_filters('give_donation_confirmation_success_page_shortcode_view', give_form_shortcode([]));
181 +
182 + return str_replace($receiptShortcode, $view, $content);
179 183 }
180 184
181 185 /**
182 186 * Load form template