Skip to content

Instantly share code, notes, and snippets.

@bekarice
Last active September 16, 2015 18:11
Show Gist options
  • Save bekarice/0302d4d0ad7823abf229 to your computer and use it in GitHub Desktop.
Save bekarice/0302d4d0ad7823abf229 to your computer and use it in GitHub Desktop.
Dev Docs Example: WooCommerce Memberships Filter Delayed Content Message
<?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