woocommerce_api_jsonp_enabled

woocommerce_api_jsonp_enabled

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

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

apply_filters('woocommerce_api_jsonp_enabled') is found 3 times:

  • /includes/legacy/api/v1/class-wc-api-json-handler.php line 53
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    */
    public function generate_response( $data ) {
        if ( isset( $_GET['_jsonp'] ) ) {
     
            if ( ! apply_filters( 'woocommerce_api_jsonp_enabled', true ) ) {
                WC()->api->server->send_status( 400 );
                return wp_json_encode( array( array( 'code' => 'woocommerce_api_jsonp_disabled', 'message' => __( 'JSONP support is disabled on this site', 'woocommerce' ) ) ) );
            }
     
            $jsonp_callback = $_GET['_jsonp'];
  • /includes/legacy/api/v2/class-wc-api-json-handler.php line 52
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    */
    public function generate_response( $data ) {
        if ( isset( $_GET['_jsonp'] ) ) {
     
            if ( ! apply_filters( 'woocommerce_api_jsonp_enabled', true ) ) {
                WC()->api->server->send_status( 400 );
                return wp_json_encode( array( array( 'code' => 'woocommerce_api_jsonp_disabled', 'message' => __( 'JSONP support is disabled on this site', 'woocommerce' ) ) ) );
            }
     
            $jsonp_callback = $_GET['_jsonp'];
  • /includes/legacy/api/v3/class-wc-api-json-handler.php line 52
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    */
    public function generate_response( $data ) {
        if ( isset( $_GET['_jsonp'] ) ) {
     
            if ( ! apply_filters( 'woocommerce_api_jsonp_enabled', true ) ) {
                WC()->api->server->send_status( 400 );
                return wp_json_encode( array( array( 'code' => 'woocommerce_api_jsonp_disabled', 'message' => __( 'JSONP support is disabled on this site', 'woocommerce' ) ) ) );
            }
     
            $jsonp_callback = $_GET['_jsonp'];