Enabled product bundles
This commit is contained in:
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/class-wc-rest-legacy-coupons-controller.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/class-wc-rest-legacy-coupons-controller.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/class-wc-rest-legacy-orders-controller.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/class-wc-rest-legacy-orders-controller.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/class-wc-rest-legacy-products-controller.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/class-wc-rest-legacy-products-controller.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-authentication.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-authentication.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-coupons.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-coupons.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-customers.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-customers.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-json-handler.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-json-handler.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-orders.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-orders.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-products.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-products.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-reports.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-reports.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-resource.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-resource.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-server.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-server.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-xml-handler.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/class-wc-api-xml-handler.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/interface-wc-api-handler.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v1/interface-wc-api-handler.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-authentication.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-authentication.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-coupons.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-coupons.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-customers.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-customers.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-exception.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-exception.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-json-handler.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-json-handler.php
Normal file → Executable file
7
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-orders.php
Normal file → Executable file
7
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-orders.php
Normal file → Executable file
@@ -360,8 +360,6 @@ class WC_API_Orders extends WC_API_Resource {
|
||||
public function create_order( $data ) {
|
||||
global $wpdb;
|
||||
|
||||
wc_transaction_query( 'start' );
|
||||
|
||||
try {
|
||||
if ( ! isset( $data['order'] ) ) {
|
||||
throw new WC_API_Exception( 'woocommerce_api_missing_order_data', sprintf( __( 'No %1$s data specified to create %1$s', 'woocommerce' ), 'order' ), 400 );
|
||||
@@ -466,15 +464,10 @@ class WC_API_Orders extends WC_API_Resource {
|
||||
do_action( 'woocommerce_api_create_order', $order->get_id(), $data, $this );
|
||||
do_action( 'woocommerce_new_order', $order->get_id() );
|
||||
|
||||
wc_transaction_query( 'commit' );
|
||||
|
||||
return $this->get_order( $order->get_id() );
|
||||
|
||||
} catch ( WC_Data_Exception $e ) {
|
||||
wc_transaction_query( 'rollback' );
|
||||
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => 400 ) );
|
||||
} catch ( WC_API_Exception $e ) {
|
||||
wc_transaction_query( 'rollback' );
|
||||
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
|
||||
}
|
||||
}
|
||||
|
||||
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-products.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-products.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-reports.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-reports.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-resource.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-resource.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-server.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-server.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-webhooks.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/class-wc-api-webhooks.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/interface-wc-api-handler.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v2/interface-wc-api-handler.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-authentication.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-authentication.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-coupons.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-coupons.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-customers.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-customers.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-exception.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-exception.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-json-handler.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-json-handler.php
Normal file → Executable file
9
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-orders.php
Normal file → Executable file
9
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-orders.php
Normal file → Executable file
@@ -389,16 +389,12 @@ class WC_API_Orders extends WC_API_Resource {
|
||||
* Create an order
|
||||
*
|
||||
* @since 2.2
|
||||
*
|
||||
* @param array $data raw order data
|
||||
*
|
||||
* @return array|WP_Error
|
||||
*/
|
||||
public function create_order( $data ) {
|
||||
global $wpdb;
|
||||
|
||||
wc_transaction_query( 'start' );
|
||||
|
||||
try {
|
||||
if ( ! isset( $data['order'] ) ) {
|
||||
throw new WC_API_Exception( 'woocommerce_api_missing_order_data', sprintf( __( 'No %1$s data specified to create %1$s', 'woocommerce' ), 'order' ), 400 );
|
||||
@@ -508,15 +504,10 @@ class WC_API_Orders extends WC_API_Resource {
|
||||
do_action( 'woocommerce_api_create_order', $order->get_id(), $data, $this );
|
||||
do_action( 'woocommerce_new_order', $order->get_id() );
|
||||
|
||||
wc_transaction_query( 'commit' );
|
||||
|
||||
return $this->get_order( $order->get_id() );
|
||||
|
||||
} catch ( WC_Data_Exception $e ) {
|
||||
wc_transaction_query( 'rollback' );
|
||||
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => 400 ) );
|
||||
} catch ( WC_API_Exception $e ) {
|
||||
wc_transaction_query( 'rollback' );
|
||||
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
|
||||
}
|
||||
}
|
||||
|
||||
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-products.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-products.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-reports.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-reports.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-resource.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-resource.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-server.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-server.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-taxes.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-taxes.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-webhooks.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/class-wc-api-webhooks.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/interface-wc-api-handler.php
Normal file → Executable file
0
backend/wordpress/wp-content/plugins/woocommerce/includes/api/legacy/v3/interface-wc-api-handler.php
Normal file → Executable file
Reference in New Issue
Block a user