WC_Shop_Customizer::add_styles()publicWC 1.0

CSS styles to disable the Checkout section, when the default checkout page contains the Checkout block, and to enhance form visuals.

Method of the class: WC_Shop_Customizer{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Shop_Customizer = new WC_Shop_Customizer();
$WC_Shop_Customizer->add_styles();

WC_Shop_Customizer::add_styles() code WC 9.4.2

<?php
public function add_styles() {
	if ( $this->has_block_checkout() ) {
		?>
		<style type="text/css">
			li#accordion-section-woocommerce_checkout {
				pointer-events: none;
			}

			li#accordion-section-woocommerce_checkout .accordion-section-title {
				background: #f1f1f1;
			}

			ul#sub-accordion-panel-woocommerce .notice {
				border-color: #007cba;
				border-bottom: 0;
				border-right: 0;
				border-top: 0;
				margin-top: 0;
				padding-bottom: 10px;
				padding-top: 10px;
			}
		</style>
		<?php
	}

	?>
	<style type="text/css">
		.woocommerce-cropping-control {
			margin: 0 40px 1em 0;
			padding: 0;
			display:inline-block;
			vertical-align: top;
		}

		.woocommerce-cropping-control input[type=radio] {
			margin-top: 1px;
		}

		.woocommerce-cropping-control span.woocommerce-cropping-control-aspect-ratio {
			margin-top: .5em;
			display:block;
		}

		.woocommerce-cropping-control span.woocommerce-cropping-control-aspect-ratio input {
			width: auto;
			display: inline-block;
		}
	</style>
	<?php
}