Overriding Shortcode Templates in Pay For Post with WooCommerce
All shortcode templates are located in
/plugins/woocommerce-pay-per-post/public/partials/ you can copy any of the files listed there to your theme/child-theme directory at
If you wanted to change the You have not purchased any protected posts text that is in the
shortcode-purchased.php template you would do the following.
/plugins/woocommerce-pay-per-post/public/partials/shortcode-purchased.php and put it into
You could then change the template to look something like this.
<div class="wc-ppp-purchased-container"> <?php if ( count( $purchased ) > 0 ) : ?> <ul id="what-ever-you-want"> <?php foreach ( $purchased as $post ) : ?> <li> <a href="<?php echo esc_url( get_permalink( $post->ID ) ); ?>"><?php echo esc_html( $post->post_title ); ?></a> </li> <?php endforeach; ?> </ul> <?php else : ?> <p><?php esc_attr_e( 'YOU CHANGED THIS TEXT TO BE WHATEVER YOU WANT.', 'wc_pay_per_post' ); ?></p> <?php endif; ?> </div>