mirror of
https://github.com/pronamic/woocommerce-subscriptions.git
synced 2025-10-17 23:02:56 +00:00
Updates to 6.4.0
This commit is contained in:
@@ -132,6 +132,11 @@ class WCS_Webhooks {
|
||||
|
||||
switch ( $webhook->get_api_version() ) {
|
||||
case 'legacy_v3':
|
||||
|
||||
if ( is_null( wc()->api ) ) {
|
||||
throw new \Exception( 'The Legacy REST API plugin is not installed on this site. More information: https://developer.woocommerce.com/2023/10/03/the-legacy-rest-api-will-move-to-a-dedicated-extension-in-woocommerce-9-0/ ' );
|
||||
}
|
||||
|
||||
WC()->api->WC_API_Subscriptions->register_routes( array() );
|
||||
$payload = WC()->api->WC_API_Subscriptions->get_subscription( $resource_id );
|
||||
break;
|
||||
@@ -147,7 +152,7 @@ class WCS_Webhooks {
|
||||
|
||||
break;
|
||||
case 'wp_api_v3':
|
||||
$payload = wc()->api->get_endpoint_data( "/wc/v3/subscriptions/{$resource_id}" );
|
||||
$payload = WCS_API::get_wc_api_endpoint_data( "/wc/v3/subscriptions/{$resource_id}" );
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user