Replace the locked episode prompt with an inline tier comparison
The locked-episode prompt is the most valuable piece of copy on a podcaster’s site. Somebody has arrived wanting a specific episode and found they cannot have it — they are as close to subscribing as a visitor ever gets, and the default message is a padlock and a sentence.
benecaster_locked_content_message replaces it with whatever converts better: a tier comparison, a trial offer, a note about what else that tier includes.
You are told both which tier the episode needs and which the visitor holds, and the difference between them is what makes this worth doing. Somebody on a lower tier needs an upgrade prompt; somebody with no subscription at all needs a first-time offer. The same message for both wastes the moment.
Code
<?php
add_filter( 'benecaster_locked_content_message', function ( string $html, int $episode_id, string $required_tier, string $user_tier ): string {
$show_id = wp_get_post_parent_id( $episode_id );
ob_start();
?>
<div class="my-locked-prompt">
<p><?php esc_html_e( 'This episode is for paying subscribers.', 'my-theme' ); ?></p>
<?php if ( $user_tier !== '' ) : ?>
<p><?php esc_html_e( 'Upgrade your plan to access it.', 'my-theme' ); ?></p>
<?php endif; ?>
<a href="<?php echo esc_url( get_permalink( $show_id ) ); ?>" class="button">
<?php esc_html_e( 'See subscription options', 'my-theme' ); ?>
</a>
</div>
<?php
return ob_get_clean();
}, 10, 4 );
Hooks Used
Need this built rather than just documented? See our services →