wpsc_paypal_standard_deactivate_subscription

Located in: paypal-standard.merchant.php

Functions that call this hook: process_gateway_notification()

Arguments Accepted: $subscr_id, $merchant_object

Version Introduced: 3.8.9

Description: This action is triggered when subscription via PayPal Standard is canceled.

Code in context:

[php firstline=”518″ highlight=”519″]

case ‘subscr_cancel’:

do_action( ‘wpsc_paypal_standard_deactivate_subscription’, $this->paypal_ipn_values[‘subscr_id’], $this );

case ‘subscr_eot’:

case ‘subscr_failed’:

foreach($this->cart_items as $cart_row) {

$altered_count = 0;

if((bool)$cart_row[‘is_recurring’] == true) {

$altered_count++;

wpsc_update_cartmeta($cart_row[‘cart_item_id’], ‘is_subscribed’, 0);

}

}

break;

[/php]