| @@ -108,13 +108,11 @@ | ||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | public function renderValidNote($checkoutData) |
| 111 | 111 | { |
| 112 | - $isValid = Arr::get($checkoutData, 'tax_data.valid', false); | |
| 113 | - $name = Arr::get($checkoutData, 'tax_data.name', ''); | |
| 114 | - $taxTotal = Arr::get($checkoutData, 'tax_data.tax_total', 0); | |
| 115 | - $declarationNote = sanitize_text_field(Arr::get($checkoutData, 'tax_data.declaration_note', '')); | |
| 116 | - $isReverseCharge = $isValid && (int) Arr::get($checkoutData, 'tax_data.tax_behavior', 2) === 0; | |
| 112 | + $isValid = Arr::get($checkoutData, 'tax_data.valid', false); | |
| 113 | + $name = Arr::get($checkoutData, 'tax_data.name', ''); | |
| 114 | + $taxTotal = Arr::get($checkoutData, 'tax_data.tax_total', 0); | |
| 117 | 115 | ?> |
| 118 | 116 | <div |
| 119 | 117 | class="fct_vat_valid_note <?php echo !$isValid ? 'is-hidden' : ''; ?>" |
| 120 | 118 | data-fluent-cart-tax-valid-note-wrapper |
| @@ -126,23 +124,8 @@ | ||
| 126 | 124 | <?php if ($taxTotal != 0 && $isValid): ?> |
| 127 | 125 | <span class="fct_vat_reverse_charge_warning"> |
| 128 | 126 | <?php echo esc_html__('(Reverse Charge not applied)', 'fluent-cart'); ?> |
| 129 | 127 | </span> |
| 130 | - <?php endif; ?> | |
| 131 | - | |
| 132 | - <?php if ($isReverseCharge): ?> | |
| 133 | - <div class="fct_vat_declaration_note_wrapper"> | |
| 134 | - <textarea | |
| 135 | - id="fct_vat_declaration_note" | |
| 136 | - name="fct_vat_declaration_note" | |
| 137 | - data-fluent-cart-vat-declaration-note | |
| 138 | - maxlength="255" | |
| 139 | - rows="2" | |
| 140 | - placeholder="<?php echo esc_attr__('e.g. I confirm reverse charge applies — VAT will be self-accounted in my country. Saved with your order. Max 255 characters. ', 'fluent-cart'); ?>" | |
| 141 | - aria-label="<?php echo esc_attr__('Reverse Charge Declaration', 'fluent-cart'); ?>" | |
| 142 | - aria-describedby="fct_vat_declaration_note_hint" | |
| 143 | - ><?php echo esc_textarea($declarationNote); ?></textarea> | |
| 144 | - </div> | |
| 145 | 128 | <?php endif; ?> |
| 146 | 129 | </div> |
| 147 | 130 | <?php |
| 148 | 131 | } |