PATH:
home
/
lab2454c
/
gemition.com
/
wp-content
/
plugins
/
woocommerce
/
includes
/
rest-api
/
Controllers
/
Version3
<?php /** * REST API Coupons controller * * Handles requests to the /coupons endpoint. * * @package WooCommerce\RestApi * @since 2.6.0 */ defined( 'ABSPATH' ) || exit; /** * REST API Coupons controller class. * * @package WooCommerce\RestApi * @extends WC_REST_Coupons_V2_Controller */ class WC_REST_Coupons_Controller extends WC_REST_Coupons_V2_Controller { /** * Endpoint namespace. * * @var string */ protected $namespace = 'wc/v3'; /** * Prepare objects query. * * @param WP_REST_Request $request Full details about the request. * @return array */ protected function prepare_objects_query( $request ) { $args = parent::prepare_objects_query( $request ); // Set post_status. $args['post_status'] = $request['status']; if ( ! empty( $request['code'] ) ) { $id = wc_get_coupon_id_by_code( $request['code'] ); $args['post__in'] = array( $id ); } // Get only ids. $args['fields'] = 'ids'; return $args; } }
[-] class-wc-rest-customer-downloads-controller.php
[edit]
[-] class-wc-rest-report-coupons-totals-controller.php
[edit]
[-] class-wc-rest-report-sales-controller.php
[edit]
[-] class-wc-rest-setting-options-controller.php
[edit]
[-] class-wc-rest-terms-controller.php
[edit]
[-] class-wc-rest-product-variations-controller.php
[edit]
[-] class-wc-rest-settings-controller.php
[edit]
[-] class-wc-rest-order-refunds-controller.php
[edit]
[-] class-wc-rest-crud-controller.php
[edit]
[-] class-wc-rest-data-countries-controller.php
[edit]
[+]
..
[-] class-wc-rest-shipping-methods-controller.php
[edit]
[-] class-wc-rest-controller.php
[edit]
[-] class-wc-rest-product-attribute-terms-controller.php
[edit]
[-] class-wc-rest-customers-controller.php
[edit]
[-] class-wc-rest-report-orders-totals-controller.php
[edit]
[-] class-wc-rest-network-orders-controller.php
[edit]
[-] class-wc-rest-data-controller.php
[edit]
[-] class-wc-rest-webhooks-controller.php
[edit]
[-] class-wc-rest-tax-classes-controller.php
[edit]
[-] class-wc-rest-report-products-totals-controller.php
[edit]
[-] class-wc-rest-product-shipping-classes-controller.php
[edit]
[-] class-wc-rest-orders-controller.php
[edit]
[-] class-wc-rest-report-customers-totals-controller.php
[edit]
[-] class-wc-rest-system-status-tools-controller.php
[edit]
[-] class-wc-rest-order-notes-controller.php
[edit]
[-] class-wc-rest-product-attributes-controller.php
[edit]
[-] class-wc-rest-coupons-controller.php
[edit]
[-] class-wc-rest-data-continents-controller.php
[edit]
[-] class-wc-rest-products-controller.php
[edit]
[-] class-wc-rest-shipping-zones-controller.php
[edit]
[-] class-wc-rest-report-top-sellers-controller.php
[edit]
[-] class-wc-rest-report-reviews-totals-controller.php
[edit]
[-] class-wc-rest-payment-gateways-controller.php
[edit]
[-] class-wc-rest-system-status-controller.php
[edit]
[-] class-wc-rest-shipping-zones-controller-base.php
[edit]
[-] class-wc-rest-posts-controller.php
[edit]
[-] class-wc-rest-product-tags-controller.php
[edit]
[-] class-wc-rest-shipping-zone-methods-controller.php
[edit]
[-] class-wc-rest-product-reviews-controller.php
[edit]
[-] class-wc-rest-shipping-zone-locations-controller.php
[edit]
[-] class-wc-rest-reports-controller.php
[edit]
[-] class-wc-rest-data-currencies-controller.php
[edit]
[-] class-wc-rest-taxes-controller.php
[edit]
[-] class-wc-rest-product-categories-controller.php
[edit]