Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Last active December 10, 2021 14:33
Show Gist options
  • Save xlplugins/13768ed3c002f0ff00ba3fe0ac3c9cef to your computer and use it in GitHub Desktop.
Save xlplugins/13768ed3c002f0ff00ba3fe0ac3c9cef to your computer and use it in GitHub Desktop.
Switch Checkout pages for virtual and simple cart products
add_filter( 'wfacp_global_checkout_page_id', function ( $id ) {
$virtual_product_checkout_id=978; // Make new checkout page for only virtual product and assign here
if ( 0 == $id ) {
return $id;
}
if ( WFACP_Common::is_cart_is_virtual() || WFACP_Common::is_cart_is_virtual( true ) ) {
return $virtual_product_checkout_id;
}
return $id;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment