|
How to format woocommerce _completed_date hidden custom field
Started by: Nicholas
in: Toolset Professional Support
Quick solution available
Problem: I would like to display the WooCommerce Order's completed date, but the hidden custom field _completed_date is not formatted as I would like.
Solution:
Add this custom shortcode to your functions.php file:
function format_completed_date_func($atts) {
$a = shortcode_atts( array(
'format' => 'm d Y',
'orderid' => 0
), $atts );
$completedDate = get_post_meta( $a['orderid'], '_completed_date', true );
if ( !$completedDate )
return;
$time = strtotime($completedDate);
$date = date($a['format'], $time);
return $date;
}
add_shortcode( 'format_completed_date', 'format_completed_date_func');
Use the custom shortcode in a View's loop like this:
[format_completed_date format='m/d/Y' orderid='[wpv-post-id]']
Replace m/d/Y with the PHP date formatting of your choice.
Relevant Documentation:
https://developer.wordpress.org/reference/functions/get_post_meta
https://codex.wordpress.org/Shortcode_API
http://php.net/manual/en/function.date.php
http://php.net/manual/en/function.strtotime.php
|
|
2 |
5 |
6 years, 6 months ago
Nicholas
|
|
WooCommerce Search Page is broken
Started by: craigB-6
in: Toolset Professional Support
|
|
2 |
4 |
6 years, 6 months ago
craigB-6
|
|
WooCommerce > CheckOut > Paying by cheque results in > Internal Server Error
Started by: craigB-6
in: Toolset Professional Support
|
|
1 |
2 |
6 years, 6 months ago
craigB-6
|
|
WooCommerce orders not Emailing
Started by: craigB-6
in: Toolset Professional Support
|
|
1 |
2 |
6 years, 6 months ago
craigB-6
|
|
The new BETA of the CRED plugin is not recognised by the Reference Sites plugin
Started by: michaelL-20
in: Toolset Professional Support
Quick solution available
|
|
2 |
3 |
6 years, 6 months ago
michaelL-20
|
|
Ad package functionality / Retro-fitting Toolset Classifieds
Started by: pamelaB-2
in: Toolset Professional Support
Quick solution available
Problem: I would like to add some new Ad Packages to the Toolset Classifieds site.
Solution: A large portion of the functionality of the Classifieds reference site is built into the custom code of the Classifieds plugin. This plugin was written explicitly for the reference site, and it's not easily extensible...new Ad Packages aren't going to just work out-of-the-box, and customization of the existing packages is not advisable. I consider it more of a "here's what can be accomplished with some custom code" reference tool than a "here's fully-featured site you can start with" starter kit.
We have had other Users attempt to extend the reference site to work in a real-world application, and it always involves extensive code knowledge. I cannot suggest it if you're not an experienced developer. If you need assistance with that type of customization, we do have a Contractors portal available where you can connect with professional developers who may be able to assist. You can find our portal available here:
https://toolset.com/contractors
|
|
2 |
2 |
6 years, 6 months ago
Christian Cox
|
|
Create a nested View
Started by: TommyW3563
in: Toolset Professional Support
Quick solution available
Problem: I need to create a nested View structure.
Solution:
- Edit the View called "Listing subcategories".
- Scroll down to the Loop Output section and place your cursor just after the taxonomy link tag, before the closing wpv-loop tag. The taxonomy link tag is highlighted in the screenshot here.
- Click the "Fields and Views" button above the editor and insert the View called "Listing subsubcategories" just after the taxonomy link. The default configurations for the View should be fine.
|
|
3 |
4 |
6 years, 6 months ago
TommyW3563
|
|
Cannot find Toolset Classifieds Plugin
Started by: lethumusaK
in: Toolset Professional Support
Quick solution available
|
|
2 |
6 |
6 years, 7 months ago
lethumusaK
|
|
Sub-subcategories
Started by: TommyW3563
in: Types Community Support
|
|
2 |
8 |
6 years, 7 months ago
Christian Cox
|
|
Can we send an email without creating a "Message"
Started by: PaulS4783
in: Toolset Professional Support
|
|
2 |
4 |
6 years, 7 months ago
Nigel
|
|
Crazy name being displayed in CRED success message
Started by: TommyW3563
in: Types Community Support
Quick solution available
Problem: I am using the wpv-current-user shortcode to display the current User's display_name in a CRED form success message, but I would like to show their first and last name instead.
Solution: Remove the wpv-current-user shortcode and use the Fields and Views button to insert the correct information instead.
|
|
2 |
3 |
6 years, 7 months ago
TommyW3563
|
|
Setting field to “required” does nothing in CRED
Started by: PaulS4783
in: Toolset Professional Support
Quick solution available
|
|
2 |
5 |
6 years, 7 months ago
PaulS4783
|
|
How to filter a parent select list in CRED (based on a selected “grandparent”)
Started by: PaulS4783
in: Toolset Professional Support
Quick solution available
Problem:
How to create dependent select dropdown using CRED form
Solution:
There is no such feature available to add dependent dropdown to CRED forms. This feature is not supported by current CRED.
Relevant Documentation:
|
|
2 |
3 |
6 years, 7 months ago
PaulS4783
|
|
Search implementation methods in Real Estate Reference Site
Started by: Arthur
in: Toolset Professional Support
|
|
2 |
3 |
6 years, 7 months ago
Arthur
|
|
Custom field – edit in original language doesn't update value in the translation
Started by: PaulS4783
in: Toolset Professional Support
|
|
2 |
8 |
6 years, 8 months ago
Nigel
|