Remove all plugins / install base theme

This commit is contained in:
Tony Volpe
2024-06-18 16:14:48 -04:00
parent ecc33d62f0
commit 95cb30b884
7455 changed files with 0 additions and 1722920 deletions

View File

@@ -1,443 +0,0 @@
<?php
/**
* Checkout Form
*
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-checkout.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 3.5.0
*/
if (!defined('ABSPATH')) {
exit;
}
do_action('woocommerce_before_checkout_form', $checkout);
// If checkout registration is disabled and not logged in, the user cannot checkout.
if (!$checkout->is_registration_enabled() && $checkout->is_registration_required() && !is_user_logged_in()) {
echo esc_html(apply_filters('woocommerce_checkout_must_be_logged_in_message', __('You must be logged in to checkout.', 'woocommerce')));
return;
}
?>
<div id='v-app'>
<form name="checkout" method="post" class="checkout woocommerce-checkout" action="<?php echo esc_url(wc_get_checkout_url()); ?>" enctype="multipart/form-data">
<?php if ($checkout->get_checkout_fields()) : ?>
<?php do_action('woocommerce_checkout_before_customer_details'); ?>
<div class="col2-set" id="customer_details">
<div class="col-1">
<div class="form-steps">
<div class="step-1" v-show="step === 'step-1'">
<?php do_action('woocommerce_checkout_billing'); ?>
<?php do_action('woocommerce_checkout_shipping'); ?>
<a href="#" class="button--primary" @click.prevent="switchStep">Review Order</a>
</div>
<div class="step-2" v-show="step === 'step-2'">
<p>Please review the information below, and enter your payment details to complete your order.</p>
<hr />
<div class="d-flex justify-content-between">
<h4>1. Subscriber Information</h4>
<a href="#" @click.prevent="switchStep">Edit</a>
</div>
<p><strong>Name (Person using the service):</strong><br />
{{ subscriber_first_name }} {{ subscriber_last_name }}<br />
<strong>Gender:</strong><br />
{{ subscriber_gender }}<br />
<div class="d-flex justify-content-between">
<h4>Subscriber Contact Information</h4>
<a href="#" @click.prevent="switchStep">Edit</a>
</div>
<p v-html="subscriber_address_preview"></p>
<div class="d-flex justify-content-between">
<h4>2. Billing Address</h4>
<a href="#" @click.prevent="switchStep">Edit</a>
</div>
<p v-html="billing_address_preview"></p>
<div class="d-flex justify-content-between">
<h4>3. Shipping Address</h4>
<a href="#" @click.prevent="switchStep">Edit</a>
</div>
<p v-html="shipping_address_preview"></p>
<h4>4. Payment Information</h4>
<p>Your payment method won't be charged until after you've spoken to one of our sales representivites.</p>
<p class="form-row my-field-class orm-row-wide" id="card_number_field" data-priority=""><label for="card_number" class="">Credit Card&nbsp;<span class="optional">(optional)</span></label><span class="woocommerce-input-wrapper"><cleave v-model="card_number" type="tel" v-model="form.cardNumber" class="form-control" :options="options.creditCard" type="number" class="input-text" name="card_number" id="card_number" placeholder="" ></span></p>
<span class="cc_type"></span>
<p class="form-row my-field-class orm-row-wide" id="expiration_month_field" data-priority=""><label for="expiration_month" class="">Expiration Month&nbsp;<span class="optional">(optional)</span></label><span class="woocommerce-input-wrapper"><input type="number" class="input-text " name="expiration_month" id="expiration_month" placeholder="" value="" v-model="expiration_month" min="1" max="12" step="1" /></span></p>
<p class="form-row my-field-class orm-row-wide" id="expiration_year_field" data-priority=""><label for="expiration_year" class="">Expiration Year&nbsp;<span class="optional">(optional)</span></label><span class="woocommerce-input-wrapper"><input type="number" class="input-text " name="expiration_year" id="expiration_year" placeholder="" value="" v-model="expiration_year" min="2024" max="2032" step="1" /></span></p>
<div class="d-flex mt-3">
<input class="mt-2 me-2" type="checkbox" v-model="i_agree" />
<p>By checking this box, I am confirming that I have read and agree with the <a href="/terms-of-use/" target="_blank">terms of use</a> associated with placing this order. Lifeline values your privacy. Please read our <a href="/privacy-policy/" target="_blank">privacy policy</a> form for more information.</p>
</div>
</div>
</div>
</div>
<div class="col-2">
<div class="d-flex ms-5">
<?php echo generateCartSummary(false); ?>
</div>
</div>
</div>
<?php do_action('woocommerce_checkout_after_customer_details'); ?>
<?php endif; ?>
<?php do_action('woocommerce_checkout_before_order_review_heading'); ?>
<h3 id="order_review_heading"><?php esc_html_e('Your order', 'woocommerce'); ?></h3>
<?php do_action('woocommerce_checkout_before_order_review'); ?>
<div id="order_review" class="woocommerce-checkout-review-order" style="position: relative;">
<div v-show="!canCheckOut" style="width: 100%; height: 100%; background: white; z-index: 1; position: absolute; opacity: 0.75;"></div>
<?php do_action('woocommerce_checkout_order_review'); ?>
</div>
<?php do_action('woocommerce_checkout_after_order_review'); ?>
</form>
</div>
<?php do_action('woocommerce_after_checkout_form', $checkout); ?>
<style>
#place_order {
border: none;
padding: 8px 20px;
background-color: #F5AD23 !important;
color: #fff !important;
font-size: 25px;
font-weight: 600;
text-decoration: none;
box-sizing: border-box;
display: inline-block;
line-height: 36px;
}
.woocommerce-billing-fields > h3 {
/* hide the billing details headline */
display: none;
visibility: hidden;
}
body.checkout-step-1 #order_review, body.checkout-step-1 #order_review_heading {
visibility: hidden;
display: none;
}
span.woocommerce-input-wrapper {
display: flex;
align-items: center;
}
span.woocommerce-input-wrapper label {
padding: 0 20px 0 5px;
}
tr.woocommerce-shipping-totals {
display: none;
visibility: hidden;
}
#caregiver_authorized_field label {
line-height: 1.2;
cursor: pointer;
}
#caregiver_authorized_field span {
display: none;
visibility: hidden;
}
span.optional {
display: none;
visibility: hidden;
}
#order_review_heading, .woocommerce table.shop_table {
display: none;
visibility: hidden;
}
.cc_type {
float: right;
top: -40px;
position: relative;
right: 15px;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/cleave.js@1"></script>
<script src="https://unpkg.com/vue@3.2/dist/vue.global.prod.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-cleave-component@3"></script>
<script type="module">
// import { createApp } from 'vue'
var cctype = null;
const app = Vue.createApp({
data() {
return {
step: "",
subscriber_first_name: "",
subscriber_last_name: "",
subscriber_gender: "male",
subscriber_birthdate: "1950-01-01",
subscriber_address_1: "",
subscriber_address_2: "",
subscriber_zip: "",
subscriber_city: "",
subscriber_state: "",
subscriber_email: "",
subscriber_phone: "",
show_caregiver_form: "true",
caregiver_relation: "",
caregiver_first_name: "",
caregiver_last_name: "",
caregiver_email: "",
caregiver_phone: "",
caregiver_authorized: "false",
caregiver_authorized_box: false,
card_number: "",
expiration_month: "",
expiration_year: "",
i_agree: false,
shipToADifferentAddress: true,
billing_address_preview: "",
shipping_address_preview: "",
SESSpromoid: "",
SESSpromotion_description: "",
SESScoupon_code: "",
allJQueryFieldsAreGood: false,
appliedCoupons: "",
form: {
cardNumber: null,
date: null,
},
options: {
creditCard: {
creditCard: true,
delimiter: '',
onCreditCardTypeChanged: function(type) {
console.log("onCreditCardTypeChanged", type);
if(type=="visa" ){
cctype = "Visa";
} else if (type=="mastercard") {
cctype = "MasterCard";
} else if (type=="amex") {
cctype = "American Express";
} else if (type=="discover") {
cctype = "Discover";
}
document.querySelector('.cc_type').innerHTML = '<input type="hidden" name="creditcard_type" id="creditcard_type" value="'+cctype+'"><img aria-hidden="true" src="/wp-content/themes/lifeline/images/' + type +'.png" style="width: 50px;">';
}
},
date: {
date: true,
datePattern: ['d', 'm', 'Y'],
delimiter: '/',
},
}
}
},
computed: {
subscriber_address_preview: function() {
var output = this.subscriber_first_name + " " + this.subscriber_last_name + "<br />" + this.subscriber_address_1;
if (this.subscriber_address_2) {
output = output + "<br />" + this.subscriber_address_2;
}
output = output + "<br />" + this.subscriber_city + ", " + this.subscriber_state + " " + this.subscriber_zip;
if (this.subscriber_phone) {
output = output + "<br />" + this.subscriber_phone;
}
if (this.subscriber_email) {
output = output + "<br />" + this.subscriber_email;
}
return output;
},
can_proceed_to_step_two: function() {
var requiredFields = [
"subscriber_first_name",
"subscriber_last_name",
"subscriber_address_1",
"subscriber_city",
"subscriber_state",
"subscriber_zip",
];
for (var i = 0; i < requiredFields.length; i++) {
var key = requiredFields[i];
if (!this[key]) {
return false;
}
}
return this.allJQueryFieldsAreGood;
},
canCheckOut: function() {
if (this.card_number.length == 0) {
return false;
}
if (this.expiration_month.length == 0) {
return false;
}
if (this.expiration_year.length == 0) {
return false;
}
return this.i_agree;
}
},
methods: {
checkAllJQueryFieldsAreGood: function() {
var fieldIDs = [
"billing_first_name",
"billing_last_name",
"billing_address_1",
"billing_city",
"billing_postcode",
"billing_phone",
"billing_email"
];
for (var i = 0; i < fieldIDs.length; i++) {
var id = fieldIDs[i];
if ($("#"+id).val().length === 0) {
this.allJQueryFieldsAreGood = false;
return;
}
}
this.allJQueryFieldsAreGood = true;
},
getBillingFields: function() {
var output = $("#billing_first_name").val() + " " + $("#billing_last_name").val() + "<br />";
if ($("#billing_company").val()) {
output += $("#billing_company").val() + "<br />";
}
output += $("#billing_address_1").val() + "<br />";
if ($("#billing_address_2").val()) {
output += $("#billing_address_2").val() + "<br />";
}
output += $("#billing_city").val() + ", " + $("#billing_state").val() + "<br />";
output += $("#select2-billing_country-container").text() + "<br />";
if ($("#billing_phone").val()) {
output += $("#billing_phone").val() + "<br />";
}
if ($("#billing_email").val()) {
output += $("#billing_email").val() + "<br />";
}
this.billing_address_preview = output;
},
getShippingFields: function() {
if (!this.shipToADifferentAddress) {
this.shipping_address_preview = this.billing_address_preview;
return;
}
var output = $("#shipping_first_name").val() + " " + $("#shipping_last_name").val() + "<br />";
if ($("#shipping_company").val()) {
output += $("#shipping_company").val() + "<br />";
}
output += $("#shipping_address_1").val() + "<br />";
if ($("#shipping_address_2").val()) {
output += $("#shipping_address_2").val() + "<br />";
}
output += $("#shipping_city").val() + ", " + $("#shipping_state").val() + " " + $("#shipping_postcode").val() + "<br />";
output += $("#select2-shipping_country-container").text() + "<br />";
this.shipping_address_preview = output;
},
switchStep: function() {
this.checkAllJQueryFieldsAreGood();
if (this.step === "step-1") {
if (this.can_proceed_to_step_two) {
this.step = "step-2";
} else {
// validation failed... what should we do?
}
} else {
this.step = "step-1";
}
// internal vue tracking for the "ship to a differet address?" checkbox
this.shipToADifferentAddress = $("#ship-to-different-address-checkbox").is(":checked");
this.getBillingFields();
this.getShippingFields();
setTimeout(function() {
// scrolling to top...
$(window).scrollTop($("h1").offset().top);
}, 100);
}
},
watch: {
step: function() {
console.log(this.step);
if (this.step === 'step-1') {
$("body").addClass("checkout-step-1");
$("body").removeClass("checkout-step-2");
} else {
$("body").addClass("checkout-step-2");
$("body").removeClass("checkout-step-1");
}
},
caregiver_authorized_box: function() {
if (this.caregiver_authorized_box) {
this.caregiver_authorized = "true";
return;
}
this.caregiver_authorized = "false";
}
},
mounted: function() {
this.step = "step-1";
this.SESSpromoid = "<?= $_SESSION["SESSpromoid"]; ?>";
this.SESSpromotion_description = "<?= $_SESSION["SESSpromotion_description"]; ?>";
this.SESScoupon_code = "<?= $_SESSION["SESScoupon_code"]; ?>";
// HACK!!! This will run once a second and if it finds any hidden
// coupons in the order review table then it will parse the data and set
// the vue data prop so that it can be shown how we want it to be shown
var self = this;
setInterval(function() {
if ($(".cart-discount").length === 0) {
self.appliedCoupons = "";
return;
}
self.appliedCoupons = "";
$(".cart-discount").each(function() {
var couponTitle = $(this).children("th").text();
var couponDesc = $(this).children("td").text();
self.appliedCoupons = self.appliedCoupons + couponTitle + "<br />" + couponDesc + "<br />";
});
}, 1000);
}
})
app.use(VueCleave);
app.mount('#v-app');
</script>

View File

@@ -1,110 +0,0 @@
<?php
/**
* Review order table
*
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/review-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 5.2.0
*/
defined( 'ABSPATH' ) || exit;
?>
<table class="shop_table woocommerce-checkout-review-order-table">
<thead>
<tr>
<th class="product-name"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
<th class="product-total"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
</tr>
</thead>
<tbody>
<?php
do_action( 'woocommerce_review_order_before_cart_contents' );
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
?>
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
<td class="product-name">
<?php echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) ) . '&nbsp;'; ?>
<?php echo apply_filters( 'woocommerce_checkout_cart_item_quantity', ' <strong class="product-quantity">' . sprintf( '&times;&nbsp;%s', $cart_item['quantity'] ) . '</strong>', $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo wc_get_formatted_cart_item_data( $cart_item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</td>
<td class="product-total">
<?php echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</td>
</tr>
<?php
}
}
do_action( 'woocommerce_review_order_after_cart_contents' );
?>
</tbody>
<tfoot>
<tr class="cart-subtotal">
<th><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
<td><?php wc_cart_totals_subtotal_html(); ?></td>
</tr>
<?php foreach ( WC()->cart->get_coupons() as $code => $coupon ) : ?>
<tr class="cart-discount coupon-<?php echo esc_attr( sanitize_title( $code ) ); ?>">
<th><?php wc_cart_totals_coupon_label( $coupon ); ?></th>
<td><?php print_r($coupon->get_description()); ?></td>
</tr>
<?php endforeach; ?>
<?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>
<?php do_action( 'woocommerce_review_order_before_shipping' ); ?>
<?php wc_cart_totals_shipping_html(); ?>
<?php do_action( 'woocommerce_review_order_after_shipping' ); ?>
<?php endif; ?>
<?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
<tr class="fee">
<th><?php echo esc_html( $fee->name ); ?></th>
<td><?php wc_cart_totals_fee_html( $fee ); ?></td>
</tr>
<?php endforeach; ?>
<?php if ( wc_tax_enabled() && ! WC()->cart->display_prices_including_tax() ) : ?>
<?php if ( 'itemized' === get_option( 'woocommerce_tax_total_display' ) ) : ?>
<?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited ?>
<tr class="tax-rate tax-rate-<?php echo esc_attr( sanitize_title( $code ) ); ?>">
<th><?php echo esc_html( $tax->label ); ?></th>
<td><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
</tr>
<?php endforeach; ?>
<?php else : ?>
<tr class="tax-total">
<th><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></th>
<td><?php wc_cart_totals_taxes_total_html(); ?></td>
</tr>
<?php endif; ?>
<?php endif; ?>
<?php do_action( 'woocommerce_review_order_before_order_total' ); ?>
<tr class="order-total">
<th><?php esc_html_e( 'Total', 'woocommerce' ); ?></th>
<td><?php wc_cart_totals_order_total_html(); ?></td>
</tr>
<?php do_action( 'woocommerce_review_order_after_order_total' ); ?>
</tfoot>
</table>

View File

@@ -1,83 +0,0 @@
<?php
/**
* Thankyou page
*
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/thankyou.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 3.7.0
*/
defined( 'ABSPATH' ) || exit;
?>
<div class="woocommerce-order">
<?php
if ( $order ) :
do_action( 'woocommerce_before_thankyou', $order->get_id() );
?>
<?php if ( $order->has_status( 'failed' ) ) : ?>
<p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed"><?php esc_html_e( 'Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction. Please attempt your purchase again.', 'woocommerce' ); ?></p>
<p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed-actions">
<a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="button pay"><?php esc_html_e( 'Pay', 'woocommerce' ); ?></a>
<?php if ( is_user_logged_in() ) : ?>
<a href="<?php echo esc_url( wc_get_page_permalink( 'myaccount' ) ); ?>" class="button pay"><?php esc_html_e( 'My account', 'woocommerce' ); ?></a>
<?php endif; ?>
</p>
<?php else : ?>
<p class="woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received"><?php echo apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'woocommerce' ), $order ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
<ul class="woocommerce-order-overview woocommerce-thankyou-order-details order_details">
<li class="woocommerce-order-overview__order order">
<?php esc_html_e( 'Order number:', 'woocommerce' ); ?>
<strong><?php echo $order->get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
</li>
<li class="woocommerce-order-overview__date date">
<?php esc_html_e( 'Date:', 'woocommerce' ); ?>
<strong><?php echo wc_format_datetime( $order->get_date_created() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
</li>
<?php if ( is_user_logged_in() && $order->get_user_id() === get_current_user_id() && $order->get_billing_email() ) : ?>
<li class="woocommerce-order-overview__email email">
<?php esc_html_e( 'Email:', 'woocommerce' ); ?>
<strong><?php echo $order->get_billing_email(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
</li>
<?php endif; ?>
<?php if ( $order->get_payment_method_title() ) : ?>
<li class="woocommerce-order-overview__payment-method method">
<?php esc_html_e( 'Payment method:', 'woocommerce' ); ?>
<strong><?php echo wp_kses_post( $order->get_payment_method_title() ); ?></strong>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
<?php do_action( 'woocommerce_thankyou_' . $order->get_payment_method(), $order->get_id() ); ?>
<?php do_action( 'woocommerce_thankyou', $order->get_id() ); ?>
<?php else : ?>
<p class="woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received"><?php echo apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'woocommerce' ), null ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
<?php endif; ?>
</div>