本文整理汇总了PHP中WC_Subscriptions_Manager::get_subscriptions_failed_payment_count方法的典型用法代码示例。如果您正苦于以下问题:PHP WC_Subscriptions_Manager::get_subscriptions_failed_payment_count方法的具体用法?PHP WC_Subscriptions_Manager::get_subscriptions_failed_payment_count怎么用?PHP WC_Subscriptions_Manager::get_subscriptions_failed_payment_count使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WC_Subscriptions_Manager
的用法示例。
在下文中一共展示了WC_Subscriptions_Manager::get_subscriptions_failed_payment_count方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_failed_payment_count
/**
* Returns the number of failed payments for a given subscription.
*
* @param $order WC_Order The WC_Order object of the order for which you want to determine the number of failed payments.
* @param product_id int The ID of the subscription product.
* @return string The key representing the given subscription.
* @since 1.0
*/
public static function get_failed_payment_count($order, $product_id)
{
$failed_payment_count = WC_Subscriptions_Manager::get_subscriptions_failed_payment_count($order->customer_user, WC_Subscriptions_Manager::get_subscription_key($order->id, $product_id));
return $failed_payment_count;
}