Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions includes/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,14 @@ public function add_checkout_permalink_query_var( $vars ) {
* Loads the checkout permalink template.
*
* @since 3.3.0
*
* @param string $template
* @return string
*/
public function load_checkout_permalink_template() {
public function load_checkout_permalink_template( $template ) {
if ( get_query_var( 'fb_checkout' ) ) {
// Clear the WooCommerce cart
WC()->cart->empty_cart();

// Get the 'products' query parameter
$products_param = get_query_var( 'products' );

if ( $products_param ) {
Expand Down Expand Up @@ -122,6 +123,8 @@ public function load_checkout_permalink_template() {

exit;
}

return $template;
}

/**
Expand Down