Skip to content

Instantly share code, notes, and snippets.

View MehbubRashid's full-sized avatar
🙂
Keep it simple.

Mehbub Rashid MehbubRashid

🙂
Keep it simple.
View GitHub Profile
@woogists
woogists / woocommerce-subscriptions-download-access-after-cancelled.php
Last active May 15, 2025 08:53
[WooCommerce Subscriptions]: Give access to downloadable files even if Subscription is cancelled
<?php
/*
* Access to downloadable files associated with a subscription will, by default, expire
* when the subscription is no longer "active" or "pending-cancel".
* https://woocommerce.com/document/subscriptions/faq/#section-39
* This snippet overrides that behavior to allow access as per the Download Expiry settng
* when the subscription status is "cancelled"
*/
@maddisondesigns
maddisondesigns / functions.php
Last active August 5, 2025 09:32
WooCommerce Custom Fields for Simple & Variable Products
/*
* Add our Custom Fields to simple products
*/
function mytheme_woo_add_custom_fields() {
global $woocommerce, $post;
echo '<div class="options_group">';
// Text Field