woocommerce_product_source

woocommerce_product_source

Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_product_source') is found 2 times:

  • /includes/tracks/events/class-wc-products-tracking.php line 128
    			return;
    		}
    
    		/* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */
    		$source     = apply_filters( 'woocommerce_product_source', self::is_importing() ? 'import' : self::TRACKS_SOURCE );
    		$properties = array(
    			'product_id' => $product_id,
    			'source'     => $source,
    		);
    		/* phpcs: enable */
    
    
  • /includes/tracks/events/class-wc-products-tracking.php line 344
    			'product_type'         => $product->get_type(),
    			'product_type_options' => $product_type_options_string,
    			'purchase_note'        => $product->get_purchase_note() ? 'yes' : 'no',
    			'sale_price'           => $product->get_sale_price() ? 'yes' : 'no',
    			'source'               => apply_filters( 'woocommerce_product_source', self::is_importing() ? 'import' : self::TRACKS_SOURCE ),
    			'short_description'    => $product->get_short_description() ? 'yes' : 'no',
    			'tags'                 => count( $product->get_tag_ids() ),
    			'upsells'              => ! empty( $product->get_upsell_ids() ) ? 'yes' : 'no',
    			'weight'               => $product->get_weight() ? 'yes' : 'no',
    			'global_unique_id'     => $product->get_global_unique_id() ? 'yes' : 'no',
    		);
    

See this hook used in plugins: