diff --git a/includes/forms/functions.php b/includes/forms/functions.php index 5ab6fc4b03..45a4680daa 100644 --- a/includes/forms/functions.php +++ b/includes/forms/functions.php @@ -1590,7 +1590,7 @@ function give_get_default_form_shortcode_args() { 'show_content' => '', 'float_labels' => '', 'display_style' => '', - 'continue_button_title' => __('Donate now', 'give'), + 'continue_button_title' => '', // This attribute belong to form template functionality. // You can use this attribute to set modal open button background color. diff --git a/src/DonationForms/Blocks/DonationFormBlock/Controllers/BlockRenderController.php b/src/DonationForms/Blocks/DonationFormBlock/Controllers/BlockRenderController.php index 55e6194b4e..1df3628a53 100644 --- a/src/DonationForms/Blocks/DonationFormBlock/Controllers/BlockRenderController.php +++ b/src/DonationForms/Blocks/DonationFormBlock/Controllers/BlockRenderController.php @@ -40,9 +40,7 @@ public function render(array $attributes) $viewUrl = $this->getViewUrl($donationForm, $embedId); $formUrl = esc_url(add_query_arg(['p' => $blockAttributes->formId], site_url('?post_type=give_forms'))); - - $formUrl = add_query_arg(['p' => $blockAttributes->formId], site_url('?post_type=give_forms')); - + /** * Note: iframe-resizer uses querySelectorAll so using a data attribute makes the most sense to target. * It will also generate a dynamic ID - so when we have multiple embeds on a page there will be no conflict. diff --git a/src/DonationForms/Blocks/DonationFormBlock/DataTransferObjects/BlockAttributes.php b/src/DonationForms/Blocks/DonationFormBlock/DataTransferObjects/BlockAttributes.php index 8d6ebb546a..8842cf3b8d 100644 --- a/src/DonationForms/Blocks/DonationFormBlock/DataTransferObjects/BlockAttributes.php +++ b/src/DonationForms/Blocks/DonationFormBlock/DataTransferObjects/BlockAttributes.php @@ -26,6 +26,7 @@ class BlockAttributes implements Arrayable public $openFormButton; /** + * @unreleased add v3 default for form button. * @since 3.0.0 */ public static function fromArray(array $array): BlockAttributes @@ -35,7 +36,7 @@ public static function fromArray(array $array): BlockAttributes $self->formId = !empty($array['formId']) ? (int)$array['formId'] : null; $self->blockId = !empty($array['blockId']) ? (string)$array['blockId'] : null; $self->formFormat = !empty($array['formFormat']) ? (string)$array['formFormat'] : null; - $self->openFormButton = !empty($array['openFormButton']) ? (string)$array['openFormButton'] : null; + $self->openFormButton = !empty($array['openFormButton']) ? (string)$array['openFormButton'] : __('Donate now', 'give'); return $self; }