buy-button.php
3 years ago
checkout-form.php
3 years ago
customer-dashboard-button.php
3 years ago
dashboard-tab.php
3 years ago
form.php
2 years ago
logout-button.php
3 years ago
form.php
43 lines
| 1 | <sc-checkout |
| 2 | class="checkout" |
| 3 | id="<?php echo esc_attr( $id ); ?>" |
| 4 | class="<?php echo esc_attr( $classes ); ?>" |
| 5 | style="<?php echo esc_attr( $style ); ?>" |
| 6 | > |
| 7 | <sc-form> |
| 8 | <?php if ( (bool) $honeypot_enabled ?? false ) : ?> |
| 9 | <sc-checkbox name="get_feedback" value="Feedback" style="display: none !important;"></sc-checkbox> |
| 10 | <?php endif; ?> |
| 11 | <?php echo filter_block_content( $content, 'post' ); ?> |
| 12 | </sc-form> |
| 13 | </sc-checkout> |
| 14 | <sc-register-icon-library></sc-register-icon-library> |
| 15 | |
| 16 | |
| 17 | <?php |
| 18 | // This dynamically adds prop data to a component since we cannot pass objects data as a prop. |
| 19 | \SureCart::assets()->addComponentData( |
| 20 | 'sc-checkout', |
| 21 | '#' . $id, |
| 22 | [ |
| 23 | 'prices' => $prices, |
| 24 | 'product' => $product, |
| 25 | 'customer' => $customer ?? '', |
| 26 | 'formId' => $form_id ?? '', |
| 27 | 'currencyCode' => $currency_code ?? null, |
| 28 | 'modified' => $modified ?? null, |
| 29 | 'loggedIn' => is_user_logged_in(), |
| 30 | 'mode' => ! empty( $mode ) ? $mode : 'live', |
| 31 | 'alignment' => $align ?? '', |
| 32 | 'taxProtocol' => $tax_protocol ?? [], |
| 33 | 'loadingText' => $loading_text ?? [], |
| 34 | 'successText' => $success_text ?? [], |
| 35 | 'stripePaymentElement' => $stripe_payment_element ?? false, |
| 36 | 'successUrl' => esc_url_raw( $success_url ?? null ), |
| 37 | 'processors' => $processors, |
| 38 | 'manualPaymentMethods' => $manual_payment_methods, |
| 39 | 'abandonedCheckoutEnabled' => $abandoned_checkout_enabled, |
| 40 | ] |
| 41 | ); |
| 42 | ?> |
| 43 |