Last active
September 16, 2015 18:11
-
-
Save bekarice/0302d4d0ad7823abf229 to your computer and use it in GitHub Desktop.
Dev Docs Example: WooCommerce Memberships Filter Delayed Content Message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Change the delayed content message for the "Projects" post type | |
function sv_filter_content_delayed_message( $message, $post_id, $access_time ) { | |
if ( 'project' === get_post_type( $post_id ) ) { | |
$message = 'This project is part of your membership, but not yet! You will gain access on {date}'; | |
} | |
return $message; | |
} | |
add_filter( 'wc_memberships_get_content_delayed_message', 'sv_filter_content_delayed_message', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment