Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'woocommerce_before_add_to_cart_button', 'woo_sell_service_question_delivery');
- function woo_sell_service_question_delivery(){
- if ( is_product() ) {
- $estimate_time = get_post_meta( get_the_ID(), 'wbcom_wss_estimate_time', true);
- $product_requirement = get_field( "woo_sell_services_requirement_data", get_the_ID() );
- echo "Estimate Delivery Time: " . $estimate_time . ( ( $estimate_time > 1) ? ' Days' : ' Day' ) ;
- if (!empty($product_requirement)) {
- echo "<ul>";
- foreach( $product_requirement as $requirement ) {
- echo "<li>";
- //print_r($requirement);
- echo $requirement['woo_sell_question'];
- echo "</li>";
- }
- echo "</ul>";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement