How Can We Help?

Change Expiration Time Remaining Date/Time Format

You are here:
← All Topics

This is going to be addressed in the reworked version 3.0.0 which requires PHP7.4+ as in order to use Carbon 2 which has easy timezone functionality I needed to bump the PHP minimum version. For now you can try the following:

Override the shortcode template by following these instructions – https://pramadillo.com/documentation/overriding-shortcode-templates-in-woocommerce-pay-per-post/

Add the following code to the top of the file after the Code Comments inside the <?php

Carbon\Carbon::setLocale('de');

Change ‘de’ to whatever your Locale is

Then you change the line that has

<?php echo $user_info['expiration_date']->toRfc850String(); ?>

to have the following

<?php echo $user_info['expiration_date']->format('l j F'); ?>

You can change the ‘l j F’ to be any format you want as listed at https://www.php.net/manual/en/datetime.format.php