Automattic / woocommerce-subscriptions-core

Subscriptions core package for WooCommerce
Other
81 stars 29 forks source link

Possibly Incorrect Doc Block Description for wcs_get_subscriptions_for_renewal_order() #481

Open billrobbins opened 11 months ago

billrobbins commented 11 months ago

While working with Subscriptions recently, I believe I spotted a situation where the doc block description was possibly incorrect. Here's the method and doc block:

/**
 * Get the subscription/s to which a resubscribe order relates.
 *
 * @param WC_Order|int $order The WC_Order object or ID of a WC_Order order.
 * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0
 */
function wcs_get_subscriptions_for_renewal_order( $order ) {
    return wcs_get_subscriptions_for_order( $order, array( 'order_type' => 'renewal' ) );
}

https://github.com/Automattic/woocommerce-subscriptions-core/blob/a5270ef1fec36aacb13646ddd757429978bb9a7e/includes/wcs-renewal-functions.php#L110C3-L118

It seems like this should probably say Get the subscription/s to which a renewal order relates.. The function itself works as expected with renewal orders.