1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<?php
defined( 'ABSPATH' ) || exit();
abstract class WC_Braintree_Controller_Frontend extends WC_Braintree_Rest_Controller {
protected function cart_includes() {
include_once WC_ABSPATH . 'includes/wc-cart-functions.php';
include_once WC_ABSPATH . 'includes/wc-notice-functions.php';
wc_load_cart();
WC()->cart->get_cart();
WC()->payment_gateways();
wc_maybe_define_constant( 'WOOCOMMERCE_CART', true );
wc_maybe_define_constant( 'DOING_AJAX', true );
}
protected function frontend_includes() {
WC()->frontend_includes();
wc_load_cart();
WC()->cart->get_cart();
WC()->payment_gateways();
wc_maybe_define_constant( 'DOING_AJAX', true );
}
}