Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'woocommerce_subscription_date_updated', function( $subscription, $date_type ) {
- // Only proceed if it's a next_payment date change
- if ( 'next_payment' !== $date_type || is_admin() ) {
- return;
- }
- // Make sure WP Fusion is active
- if ( ! function_exists( 'wp_fusion' ) ) {
- return;
- }
- // Sync the subscription fields
- wp_fusion()->integrations->{'woo-subscriptions'}->sync_subscription_fields( $subscription );
- }, 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement