Skip to content

Instantly share code, notes, and snippets.

@Pross
Created January 30, 2020 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pross/891a6639abb27772135dd03866449b9c to your computer and use it in GitHub Desktop.
Save Pross/891a6639abb27772135dd03866449b9c to your computer and use it in GitHub Desktop.
add_shortcode( 'something_unique', function() {
$now = strtotime( 'now' ); // The time now (in seconds).
$fixed_eot_time = strtotime( '31 August 2020' ); // Future time (in seconds).
$days_until_fixed_eot_time = round( ( $fixed_eot_time - $now ) / DAY_IN_SECONDS );
return do_shortcode( sprintf( '[s2Member-Pro-PayPal-Form level="1" ccaps="" desc="RIAPP Member / Professional Annual Membership" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="riapp.lenadev.com" ta="0" tp="0" tt="D" ra="0.01" rr="BN" rt="D" rp="%s" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]', $days_until_fixed_eot_time ) );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment