Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Keep shop Terms & Conditions synchronized on product pages
- This topic has 1 reply, 2 voices, and was last updated 4 years, 7 months ago by Sarmistha Chakraborty.
Viewing 1 reply thread
- AuthorPosts
- April 13, 2020 at 7:01 pm #118760alexdeziParticipant
Hello!
Is it possible to keep the terms & conditions of vendors synchronized with the ones on the product pages?
Right now it looks like I need to make changes on all products if I make a change on the shop terms.Thank you!
- April 13, 2020 at 9:05 pm #118798Sarmistha ChakrabortyMember
Hello,
It is not feasible to sync store terms and condition to all products,
What you can do is use this code to display store’s term&conditions in each product.add_filter('wcfm_policies_tab_element','custom_wcfm_policies_tab_element'); function custom_wcfm_policies_tab_element ($fields) { $fields['callback'] = 'fn_product_vendor_policy'; return $fields; } function fn_product_vendor_policy() { global $WCFM, $product; $vendor_id = wcfm_get_vendor_id_by_post( $product->get_id() ); $store_user = wcfmmp_get_store( $vendor_id ); $wcfm_policy_vendor_options = $store_user->get_store_policies(); $wcfm_policy_options = wcfm_get_option( 'wcfm_policy_options', array() ); $shipping_policy = isset( $wcfm_policy_vendor_options['shipping_policy'] ) ? $wcfm_policy_vendor_options['shipping_policy'] : ''; $_wcfm_shipping_policy = isset( $wcfm_policy_options['shipping_policy'] ) ? $wcfm_policy_options['shipping_policy'] : ''; if( wcfm_empty($shipping_policy) ) $shipping_policy = $_wcfm_shipping_policy; $refund_policy = isset( $wcfm_policy_vendor_options['refund_policy'] ) ? $wcfm_policy_vendor_options['refund_policy'] : ''; $_wcfm_refund_policy = isset( $wcfm_policy_options['refund_policy'] ) ? $wcfm_policy_options['refund_policy'] : ''; if( wcfm_empty($refund_policy) ) $refund_policy = $_wcfm_refund_policy; $cancellation_policy = isset( $wcfm_policy_vendor_options['cancellation_policy'] ) ? $wcfm_policy_vendor_options['cancellation_policy'] : ''; $_wcfm_cancellation_policy = isset( $wcfm_policy_options['cancellation_policy'] ) ? $wcfm_policy_options['cancellation_policy'] : ''; if( wcfm_empty($cancellation_policy) ) $cancellation_policy = $_wcfm_cancellation_policy; ?> <div class="wcfm-product-policies"> <?php do_action( 'wcfm_policy_content_before', $product->get_id() ); ?> <?php if( !wcfm_empty($shipping_policy) ) { ?> <div class="wcfm-shipping-policies"> <h2 class="wcfm_policies_heading"><?php echo apply_filters('wcfm_shipping_policies_heading', __('Shipping Policy', 'wc-frontend-manager')); ?></h2> <div class="wcfm_policies_description" ><?php echo $shipping_policy; ?></div> </div> <?php } if( !wcfm_empty( $refund_policy ) ) { ?> <div class="wcfm-refund-policies"> <h2 class="wcfm_policies_heading"><?php echo apply_filters('wcfm_refund_policies_heading', __('Refund Policy', 'wc-frontend-manager')); ?></h2> <div class="wcfm_policies_description" ><?php echo $refund_policy; ?></div> </div> <?php } if( !wcfm_empty( $cancellation_policy ) ) { ?> <div class="wcfm-cancellation-policies"> <h2 class="wcfm_policies_heading"><?php echo apply_filters('wcfm_cancellation_policies_heading', __('Cancellation / Return / Exchange Policy', 'wc-frontend-manager')); ?></h2> <div class="wcfm_policies_description" ><?php echo $cancellation_policy; ?></div> </div> <?php } ?> <?php do_action( 'wcfm_policy_content_after', $product->get_id() ); ?> </div> <?php }
Thanks.
- AuthorPosts
Viewing 1 reply thread
- You must be logged in to reply to this topic.