KOKINIO - MANAGER
Edit File: shortcode-has_access-polylang.php
<?php /** * Do not edit this file directly. You can copy this file to your theme directory * in /your-theme/woocommerce-pay-per-post/shortcode-has_access-polylang.php * The $purchased variable is a WP Posts Object of purchased posts. */ ?> <div class="wc-ppp-purchased-container"> <?php if ( count( $purchased ) > 0 ) : $current_language = pll_current_language(); ?> <ul id="what-ever-you-want"> <?php foreach ( $purchased as $post ) : $languages = pll_get_post_translations($post->ID); ?> <li> <strong><a href="<?php echo esc_url( get_permalink( $languages[$current_language] ) ); ?>">[<?php echo $current_language; ?>] <?php echo esc_html( get_the_title($languages[$current_language]) ); ?></a></strong><br> <?php if($languages > 1): ?> <?php apply_filters( 'wc_pay_per_post_languages_title', esc_html__( 'Additional Languages', 'wc_pay_per_post' ) ) ?> <ul> <?php foreach($languages as $language => $post_id): if($language === $current_language): continue; endif; ?> <li><a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>">[<?php echo $language; ?>] <?php echo esc_html( get_the_title($post_id) ); ?></a></li> <?php endforeach; ?> </ul> <?php endif; ?> </li> <?php endforeach; ?> </ul> <?php else : ?> <p><?php apply_filters( 'wc_pay_per_post_shortcode_has_access_no_posts', esc_attr_x( 'You have not have access to any protected posts.', 'wc_pay_per_post' ) ); ?></p> <?php endif; ?> </div>