$raw, 'qty' => 1, 'display_context' => $context, ) ); } /** * A product's base price to CHARGE, in base currency. When a currency switcher * is converting (active currency differs from the store base), read the raw * edit-context price so the sum is one clean base figure the switcher converts * exactly once. With nothing converting, active equals base and this is exactly * get_price(), so sales, tax and role pricing are untouched. Shared by the * standalone options price path and the bundle component sum, so both follow one * currency rule. */ function addon_boss_base_price( WC_Product $product ): float { if ( get_option( 'woocommerce_currency' ) !== get_woocommerce_currency() ) { return (float) $product->get_price( 'edit' ); } return (float) $product->get_price(); }