woocommerce_api_create_product_data

woocommerce_api_create_product_data

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_api_create_product_data') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-products.php line 224
    			if ( ! current_user_can( 'publish_products' ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_product', __( 'You do not have permission to create products', 'woocommerce' ), 401 );
    			}
    
    			$data = apply_filters( 'woocommerce_api_create_product_data', $data, $this );
    
    			// Check if product title is specified
    			if ( ! isset( $data['title'] ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_missing_product_title', sprintf( __( 'Missing parameter %s', 'woocommerce' ), 'title' ), 400 );
    			}
    
    
  • /includes/legacy/api/v3/class-wc-api-products.php line 273
    			if ( ! current_user_can( 'publish_products' ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_product', __( 'You do not have permission to create products', 'woocommerce' ), 401 );
    			}
    
    			$data = apply_filters( 'woocommerce_api_create_product_data', $data, $this );
    
    			// Check if product title is specified.
    			if ( ! isset( $data['title'] ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_missing_product_title', sprintf( __( 'Missing parameter %s', 'woocommerce' ), 'title' ), 400 );
    			}