skip cart page in book club checkout
This commit is contained in:
@ -4,8 +4,17 @@
|
||||
* Template Name: Book Club Landing
|
||||
*/
|
||||
|
||||
// Get the product URL for the book club membership
|
||||
$book_club_membership_url = wc_get_product_permalink(wc_get_product_id_by_sku('book-club-membership')) ?: '#';
|
||||
// Get the product ID for the book club membership
|
||||
$book_club_product_id = wc_get_product_id_by_sku('book-club-membership');
|
||||
|
||||
// Build the direct-to-checkout URL
|
||||
$checkout_url = add_query_arg(
|
||||
array(
|
||||
'add-to-cart' => $book_club_product_id,
|
||||
'quantity' => 1,
|
||||
),
|
||||
wc_get_checkout_url()
|
||||
);
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
@ -125,7 +134,7 @@ $book_club_membership_url = wc_get_product_permalink(wc_get_product_id_by_sku('b
|
||||
</div>
|
||||
</div>
|
||||
<div class="book-club-examples-cta">
|
||||
<a href="<?= esc_url($book_club_membership_url); ?>" class="btn btn--solid">FAZ PARTE DO CLUBE</a>
|
||||
<a href="<?= esc_url($checkout_url); ?>" class="btn btn--solid">FAZ PARTE DO CLUBE</a>
|
||||
<p>Por apenas 24,60€/mês</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -213,7 +222,7 @@ $book_club_membership_url = wc_get_product_permalink(wc_get_product_id_by_sku('b
|
||||
</div>
|
||||
</div>
|
||||
<div class="book-club-benefits-cta">
|
||||
<a href="<?= esc_url($book_club_membership_url); ?>" class="btn btn--solid">FAZ PARTE DO CLUBE</a>
|
||||
<a href="<?= esc_url($checkout_url); ?>" class="btn btn--solid">FAZ PARTE DO CLUBE</a>
|
||||
<p>Por apenas 24,60€/mês</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user