woocommerce_api_enabled

woocommerce_api_enabled

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

apply_filters('woocommerce_api_enabled') is found 3 times:

  • /includes/legacy/api/v1/class-wc-api-server.php line 211
     
    		$this->header( 'Content-Type', $this->handler->get_content_type(), true );
    
    		// the API is enabled by default
    		if ( ! apply_filters( 'woocommerce_api_enabled', true, $this ) || ( 'no' === get_option( 'woocommerce_api_enabled' ) ) ) {
    
    			$this->send_status( 404 );
    
    			echo $this->handler->generate_response( array( 'errors' => array( 'code' => 'woocommerce_api_disabled', 'message' => 'The WooCommerce API is disabled on this site' ) ) );
    
    			return;
    
  • /includes/legacy/api/v2/class-wc-api-server.php line 209
     
    		$this->header( 'Content-Type', $this->handler->get_content_type(), true );
    
    		// the API is enabled by default
    		if ( ! apply_filters( 'woocommerce_api_enabled', true, $this ) || ( 'no' === get_option( 'woocommerce_api_enabled' ) ) ) {
    
    			$this->send_status( 404 );
    
    			echo $this->handler->generate_response( array( 'errors' => array( 'code' => 'woocommerce_api_disabled', 'message' => 'The WooCommerce API is disabled on this site' ) ) );
    
    			return;
    
  • /includes/legacy/api/v3/class-wc-api-server.php line 209
     
    		$this->header( 'Content-Type', $this->handler->get_content_type(), true );
    
    		// the API is enabled by default
    		if ( ! apply_filters( 'woocommerce_api_enabled', true, $this ) || ( 'no' === get_option( 'woocommerce_api_enabled' ) ) ) {
    
    			$this->send_status( 404 );
    
    			echo $this->handler->generate_response( array( 'errors' => array( 'code' => 'woocommerce_api_disabled', 'message' => 'The WooCommerce API is disabled on this site' ) ) );
    
    			return;