get_settings_for_display();
$coupon_display_control = true;
if ( '' === $settings['section_coupon_display'] ) {
$coupon_display_control = false;
}
return wc_coupons_enabled() && $coupon_display_control;
}
/**
* Woocommerce Before Cart Table
*
* Output containing elements. Callback function for the woocommerce_before_cart_table hook
*
* This eliminates the need for template overrides.
*
* @since 3.5.0
*/
public function woocommerce_before_cart_table() {
$section_classes = [ 'e-shop-table', 'e-cart-section' ];
if ( ! $this->should_render_coupon() ) {
$section_classes[] = 'e-cart-section--no-coupon';
}
$this->add_render_attribute(
'before_cart_table', [
'class' => $section_classes,
]
);
?>
print_render_attribute_string( 'before_cart_table' ); ?>>
should_render_coupon() ) {
$this->render_woocommerce_cart_coupon_form();
}
}
/**
* Woocommerce Before Cart Collaterals
*
* Output containing elements. * Callback function for the woocommerce_before_cart_collaterals hook
*
* This eliminates the need for template overrides.
*
* @since 3.5.0
*/
public function woocommerce_before_cart_collaterals() {
?>