woocommerce_cart_

woocommerce_cart_

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

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_cart_') is found 16 times:

  • /includes/class-wc-cart.php line 215
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    * @since 3.2.0
     * @return float
     */
    public function get_subtotal() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'subtotal' ) );
    }
     
    /**
     * Get subtotal_tax.
     *
     * @since 3.2.0
  • /includes/class-wc-cart.php line 225
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    * @since 3.2.0
     * @return float
     */
    public function get_subtotal_tax() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'subtotal_tax' ) );
    }
     
    /**
     * Get discount_total.
     *
     * @since 3.2.0
  • /includes/class-wc-cart.php line 235
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    * @since 3.2.0
     * @return float
     */
    public function get_discount_total() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'discount_total' ) );
    }
     
    /**
     * Get discount_tax.
     *
     * @since 3.2.0
  • /includes/class-wc-cart.php line 245
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    * @since 3.2.0
     * @return float
     */
    public function get_discount_tax() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'discount_tax' ) );
    }
     
    /**
     * Get shipping_total.
     *
     * @since 3.2.0
  • /includes/class-wc-cart.php line 255
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    * @since 3.2.0
     * @return float
     */
    public function get_shipping_total() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'shipping_total' ) );
    }
     
    /**
     * Get shipping_tax.
     *
     * @since 3.2.0
  • /includes/class-wc-cart.php line 265
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    * @since 3.2.0
     * @return float
     */
    public function get_shipping_tax() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'shipping_tax' ) );
    }
     
    /**
     * Gets cart total. This is the total of items in the cart, but after discounts. Subtotal is before discounts.
     *
     * @since 3.2.0
  • /includes/class-wc-cart.php line 275
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    * @since 3.2.0
     * @return float
     */
    public function get_cart_contents_total() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'cart_contents_total' ) );
    }
     
    /**
     * Gets cart tax amount.
     *
     * @since 3.2.0
  • /includes/class-wc-cart.php line 285
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    * @since 3.2.0
     * @return float
     */
    public function get_cart_contents_tax() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'cart_contents_tax' ) );
    }
     
    /**
     * Gets cart total after calculation.
     *
     * @since 3.2.0
  • /includes/class-wc-cart.php line 296
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    * @param string $context If the context is view, the value will be formatted for display. This keeps it compatible with pre-3.2 versions.
     * @return float|string
     */
    public function get_total( $context = 'view' ) {
        $total = apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'total' ) );
        return 'view' === $context ? apply_filters( 'woocommerce_cart_total', wc_price( $total ) ) : $total;
    }
     
    /**
     * Get total tax amount.
     *
  • /includes/class-wc-cart.php line 307
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    * @since 3.2.0
     * @return float
     */
    public function get_total_tax() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'total_tax' ) );
    }
     
    /**
     * Get total fee amount.
     *
     * @since 3.2.0
  • /includes/class-wc-cart.php line 317
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    * @since 3.2.0
     * @return float
     */
    public function get_fee_total() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'fee_total' ) );
    }
     
    /**
     * Get total fee tax amount.
     *
     * @since 3.2.0
  • /includes/class-wc-cart.php line 327
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    * @since 3.2.0
     * @return float
     */
    public function get_fee_tax() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'fee_tax' ) );
    }
     
    /**
     * Get taxes.
     *
     * @since 3.2.0
  • /includes/class-wc-cart.php line 336
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    *
     * @since 3.2.0
     */
    public function get_shipping_taxes() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'shipping_taxes' ) );
    }
     
    /**
     * Get taxes.
     *
     * @since 3.2.0
  • /includes/class-wc-cart.php line 345
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    *
     * @since 3.2.0
     */
    public function get_cart_contents_taxes() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'cart_contents_taxes' ) );
    }
     
    /**
     * Get taxes.
     *
     * @since 3.2.0
  • /includes/class-wc-cart.php line 354
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    *
     * @since 3.2.0
     */
    public function get_fee_taxes() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'fee_taxes' ) );
    }
     
    /**
     * Return whether or not the cart is displaying prices including tax, rather than excluding tax.
     *
     * @since 3.3.0
  • /includes/class-wc-cart.php line 364
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    * @since 3.3.0
     * @return bool
     */
    public function display_prices_including_tax() {
        return apply_filters( 'woocommerce_cart_' . __FUNCTION__, 'incl' === $this->get_tax_price_display_mode() );
    }
     
    /*
    |--------------------------------------------------------------------------
    | Setters.
    |--------------------------------------------------------------------------