[WC][FW2.0] Set to default the "Product Inquiry Form"

Add the following snippet at the end of the file wp-content/themes/[theme-name]/functions.php

 

if ( ! function_exists( 'yit_enquiry_on_default' ) ):
function yit_enquiry_on_default() {
    global $post;
    update_post_meta( $post->ID, '_info_form', 'yes' );
}
add_action( 'woocommerce_single_product_summary', 'yit_enquiry_on_default', 26 );
endif;

 

This function will turn on the product inquiry form every time someone visit the single product page. If you'll want to turn off the inquiry form on all of your single product, simply, change the second parameter by yes to off

Was this article helpful?
0 out of 0 found this helpful

Back to Help Center

Powered by Zendesk