本文整理匯總了PHP中WC_Subscriptions_Product::init方法的典型用法代碼示例。如果您正苦於以下問題:PHP WC_Subscriptions_Product::init方法的具體用法?PHP WC_Subscriptions_Product::init怎麽用?PHP WC_Subscriptions_Product::init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WC_Subscriptions_Product
的用法示例。
在下文中一共展示了WC_Subscriptions_Product::init方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: get_price_html
* @since 1.0
* @deprecated 1.5.18
*/
public static function get_price_html($price, $product)
{
_deprecated_function(__METHOD__, '1.5.18', __CLASS__ . '::get_price_string()');
if (self::is_subscription($product)) {
$price = self::get_price_string($product, array('price' => $price));
}
return $price;
}
/**
* Deprecated in favour of native get_price_html() method on the Subscription Product classes (e.g. WC_Product_Subscription)
*
* Set the subscription string for products which have a $0 recurring fee, but a sign-up fee
*
* @since 1.3.4
* @deprecated 1.5.18
*/
public static function get_free_price_html($price, $product)
{
_deprecated_function(__METHOD__, '1.5.18', __CLASS__ . '::get_price_string()');
// Check if it has a sign-up fee (we already know it has no recurring fee)
if (self::is_subscription($product) && self::get_sign_up_fee($product) > 0) {
$price = self::get_price_string($product, array('price' => $price));
}
return $price;
}
}
WC_Subscriptions_Product::init();