A helper plugin for resetting all the next payment dates and pushing them back 1 minute.
Helps solve issues resulting in duplicate subscription renewal payments due to timezones.
All props go to @mattallan for this one.
<?php | |
/** | |
* Plugin Name: Prospress Script - Reset next payment dates | |
* Description: A custom plugin for Phoebe's site that will reset all the next payment dates and push them back 1 minute. | |
* Author: Matt Allan - Prospress Inc. | |
* Author URI: http://prospress.com/ | |
* Version: 1.0 | |
*/ | |
function reset_next_payment_dates() { |
public static function filter_package_rates( $package_rates, $package ) { | |
$chosen_methods = WC()->session->get( 'chosen_shipping_methods' ); | |
if ( 'none' != WC_Subscriptions_Cart::$recurring_cart_key ) { | |
// get all the shipping methods chosen for this recurring cart key | |
$recurring_cart_shipping_methods = array(); | |
foreach ( $chosen_methods as $index => $method ) { |
<?php | |
/** | |
* Plugin Name: WooCommerce Subscriptions - Use Large Site Report Caching | |
* Plugin URI: | |
* Description: By default, WooCommerce Subscriptions will cache report data on large sites. Large sites are determined by the number of orders and subscriptions. This mini-plugin will force a site to be treated as a large site. | |
* Author: Prospress Inc. | |
* Author URI: http://prospress.com/ | |
* Version: 1.0.0 | |
* | |
* Copyright 2016 Prospress, Inc. (email : [email protected]) |
<?php | |
/** | |
* Plugin Name: WooCommerce Subscriptions - Remove length from one off subscription payments | |
* Plugin URI: | |
* Description: By default, WooCommerce Subscriptions subscription products of 1 length display the period and length ($14.00 for 1 Month), this mini-plugin removes the length and period from the product price string inclusions. | |
* Author: Prospress Inc. | |
* Author URI: http://prospress.com/ | |
* Version: 1.0.0 | |
* | |
* Copyright 2016 Prospress, Inc. (email : [email protected]) |
<?php | |
/** | |
* Plugin Name: WooCommerce Subscriptions - Disable All Subscription Reports | |
* Plugin URI: | |
* Description: Remove the WooCommerce Subscriptions reports from the admin reports panel. | |
* Author: Prospress Inc. | |
* Author URI: http://prospress.com/ | |
* Version: 1.0 | |
* | |
* Copyright 2016 Prospress, Inc. (email : [email protected]) |
/** | |
* Plugin Name: WooCommerce Subscriptions Restrict Gifting to Products | |
* Description: Restrict the option to gift to specific products. | |
* Author: James Allan | |
* Version: 1.0 | |
* License: GPL v2 | |
*/ | |
function wcsrgp_is_giftable_product( $is_giftable, $product ) { | |
$giftable_product_ids = array( 24, 12859, 11418 ); |
A helper plugin for resetting all the next payment dates and pushing them back 1 minute.
Helps solve issues resulting in duplicate subscription renewal payments due to timezones.
All props go to @mattallan for this one.
<?php | |
/** | |
* Plugin Name: Delay Early Renewal Order Emails | |
* Plugin URI: https://gist.github.com/james-allan/ce82236d40e7b9ee5a1577631bbf364d | |
* Description: Delays early renewal order emails until after the subscription dates have been updated. | |
* Author: James Allan | |
* Author URI: Prospress.com | |
* Version: 1.0 | |
**/ |
<?php | |
/* | |
Plugin Name: WCS Missing Renewal Order Posts Logger | |
Plugin URI: | |
Description: A helper plugin to log when Renewal Order Posts go missing during the renewal process. | |
Author: James Allan | |
Author URI: | |
Version: 1.0 | |
*/ |
if ( 1 === self::get_coupon_limit( $coupon_code ) && 0 < $cart->get_coupon_discount_amount( $coupon_code ) ) { | |
$cart->remove_coupon( $coupon_code ); | |
} |