This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WooCommerce Remove Uninstall wc-admin Notice | |
* Plugin URI: https://woocommerce.com | |
* Description: Deletes uninstall wc-admin notice | |
* Author: WooCommerce | |
* Domain Path: /languages | |
* Version: 0.1 | |
*/ | |
function woocommerce_delete_deactivate_plugin_note() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.first-payment-date { | |
display: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_subscription_status_updated' , 'delete_cancelled_subscription' , 10 , 3 ); | |
function delete_cancelled_subscription( $subscription, $new_status, $old_status) { | |
if ($new_status == 'pending-cancel' || $new_status == 'cancelled') { | |
$subscription_id = $subscription->get_id(); | |
wc_delete_shop_order_transients($subscription_id); | |
wp_delete_post($subscription_id); | |
} | |
} |