Skip to content

Instantly share code, notes, and snippets.

View its-leofisher's full-sized avatar
☸️
Developing, engineering, learning, loving

Leo Fisher its-leofisher

☸️
Developing, engineering, learning, loving
View GitHub Profile
@gitaarik
gitaarik / git_submodules.md
Last active August 4, 2025 09:33
Git Submodules basic explanation

Git Submodules - Basic Explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@kloon
kloon / gist:4541017
Last active September 13, 2024 22:41
WooCommerce Clear Cart via URL
// check for clear-cart get param to clear the cart, append ?clear-cart to any site url to trigger this
add_action( 'init', 'woocommerce_clear_cart_url' );
function woocommerce_clear_cart_url() {
if ( isset( $_GET['clear-cart'] ) ) {
global $woocommerce;
$woocommerce->cart->empty_cart();
}
}