Support » Plugin: WC Pickup Store » How do I display short description on the Checkout page?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Keylor Mendoza

    (@keylorcr)

    Hello @a5345534

    Yes, just follow these steps:

    1- Append your custom field to the data that appears on the Checkout. Use this snippet.

    function kmchild_wps_get_store_custom_fields($fields) {
    	$fields[] = 'description';
    	return $fields;
    }
    add_filter('wps_get_store_custom_fields', 'kmchild_wps_get_store_custom_fields');

    2- Override the template. Copy from /templates/selected-store-details.php to /your-theme/template-parts/selected-store-details.php. Then, add your custom field to the template.

    <# if ( data.description ) { #>
    	<span><code>data.description.value</code></span>
    <# } #>

    Hope it helps

    Regards

    Plugin Author Keylor Mendoza

    (@keylorcr)

    Hello @a5345534

    Yes, just follow these steps:

    1- Append your custom field to the data that appears on the Checkout. Use this snippet.

    function kmchild_wps_get_store_custom_fields($fields) {
    	$fields[] = 'description';
    	return $fields;
    }
    add_filter('wps_get_store_custom_fields', 'kmchild_wps_get_store_custom_fields');

    2- Override the template. Copy from /templates/selected-store-details.php to /your-theme/template-parts/selected-store-details.php. Then, add your custom field to the template.

    <# if ( data.description ) { #>
    	<span><code>data.description.value</code></span>
    <# } #>

    Hope it helps

    Regards

    Thread Starter a5345534

    (@a5345534)

    worked!
    Thanks you very much

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I display short description on the Checkout page?’ is closed to new replies.