Skip to content

Instantly share code, notes, and snippets.

@wpbean
Created July 20, 2019 18:49
Show Gist options
  • Select an option

  • Save wpbean/3d46e52272914e0a0162662262397be1 to your computer and use it in GitHub Desktop.

Select an option

Save wpbean/3d46e52272914e0a0162662262397be1 to your computer and use it in GitHub Desktop.
WPB WooCommerce LightBox Pro adding support of WooCommerce quotation plugin
<?php
add_action( 'wpb_wl_woocommerce_product_summary', 'wpb_wl_wc_quotation', 30 );
function wpb_wl_wc_quotation(){
global $product;
?>
<div class="<?php echo $product->get_type() . "_add_to_quote button_add_to_quote" ?>">
<button class="single_adq_button button alt" id="add_to_quote"
<?php echo $product->get_type() === 'variable' ? 'data-enable-button="' . get_option( 'adq_enable_button_outofstock', 'no' ) . '"' : '' ?>
data-product-id="<?php echo $product->get_id() ?>"
data-product-type="<?php echo $product->get_type() ?>"
data-button="<?php echo $product->get_type() ?>_add_to_quote"
data-is_quote="1" type="button"> Add to quote </button>
</div>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment