rules applicable to cooperatives under this title before the enactment of subchapter T. (f) Special rules (1) Application topartnerships and S corporations (A) In general In the case of a partnership or S corporation— (i) this section shall be applied at the partner or shareholder level, (ii) each partner or shareholder shall take into account such person's allocable share of each qualified item of income, gain, deduction, and loss, and (iii) each partner or shareholder shall be treated for purposes of subsection (b) as having W-2 wages for the taxable year in an amount equal to such person's allocable share of the W-2 wages of the partnership or S corporation for the taxable year (as determined under regulations prescribed by the Secretary). For purposes of clause (iii), a partner's or shareholder's allocable share of W-2 wages shall be determined in the same manner as the partner's or shareholder's allocable share of wage expenses. For purposes of this subparagraph, in the case of an S corporation, an allocable share shall be the shareholder's pro rata share of an item. (B) Application to trusts and estates This section shall not apply to any trust or estate. (C) Treatment of trades or business in Puerto Rico (i) In general In the case of any taxpayer with qualified business income from sources within the commonwealth of Puerto Rico, if all such income is taxable under section 1 for such taxable year, then for purposes of determining the qualified business income of such taxpayer for such taxable year, the term United States shall include the Commonwealth of Puerto Rico. (ii) Special rule for applying wage limitation In the case of any taxpayer described in clause (i), the determination of W-2 wages of such taxpayer with respect to any qualified trade or business conducted in Puerto Rico shall be made without regard to any exclusion under section 3401(a)(8) for remuneration paid for services in Puerto Rico. (2) Coordination with minimum tax For purposes of determining alternative minimum taxable income under