How to use Custom Field to display product brief description in shop page with Woocommerce?

The brief description of a WooCommerce product is store as post_excerpt, to programmatically add some text, you need to hook through product excerpt. add_filter(‘get_the_excerpt’, ‘custom_excerpt’); function exc($custom_excerpt) { global $post; if($post->post_type == ‘product’){ $custom_add = __(‘This product is unavailable for some countries, please, read our terms & conditions to know more about this.’, ‘folkstone’); return … Read more

custom post type with role Vendor

First you have to passed two additional arguments into the register_post_type() function. capability_type map_meta_cap Then, You can add capability using add_cap(); function. register_post_type( ‘acme_product’, array( ‘labels’ => array( ‘name’ => __( ‘Products’ ), ‘singular_name’ => __( ‘Product’ ) ), ‘public’ => true, ‘has_archive’ => true, ‘capability_type’ => array(‘acme_product’,’acme_products’), ‘map_meta_cap’ => true, ) ); add_action(‘admin_init’,’vendor_role_caps’); function … Read more