Statistics: Posted by blewis — July 24th, 2011, 1:21 pm
Sorry for any confusion. You'll need to use <?php echo $GLOBALS["paypal_attr"]["ra"]; ?>. The %%ra%% Replacement Code is invalid inside a Pro Form template. The hack I supplied makes it possible to access Shortcode Attributes through PHP tags though.blewis wrote:
Not sure why, but the s2-hacks file in the mu-plugins directory did not work for me. The %%ra%% variable did not change to the price (it just stayed the literal string "%%ra%%" in the final output).
However, hacking the paypal-form-in.inc.php file directly did work. It's not the prettiest thing, since I not really like changing core files in plugins (due to updates). But at least it's working.
Thanks,
Bryan
<?php echo $GLOBALS["paypal_attr"]["attribute_name_goes_here"]; ?>
Statistics: Posted by Jason Caldwell — July 24th, 2011, 12:06 pm
Statistics: Posted by blewis — July 23rd, 2011, 5:44 pm
Statistics: Posted by blewis — July 22nd, 2011, 7:57 pm
/s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php
<?php
add_action ("ws_plugin__s2member_pro_before_sc_paypal_form_after_shortcode_atts", "my_action");
function my_action ($vars = array ())
{
$GLOBALS["paypal_attr"] = $vars["attr"];
}
?>
Statistics: Posted by Jason Caldwell — July 22nd, 2011, 7:14 pm
Statistics: Posted by blewis — July 22nd, 2011, 7:07 pm
/s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php
<?php
add_action ("ws_plugin__s2member_pro_before_sc_authnet_form_after_shortcode_atts", "my_action");
function my_action ($vars = array ())
{
$GLOBALS["authnet_attr"] = $vars["attr"];
}
?>
Statistics: Posted by Jason Caldwell — July 22nd, 2011, 7:02 pm
Statistics: Posted by Jason Caldwell — July 22nd, 2011, 6:44 pm
Statistics: Posted by Cristián Lávaque — July 20th, 2011, 10:03 pm
Statistics: Posted by blewis — July 20th, 2011, 11:22 am
Statistics: Posted by Cristián Lávaque — July 20th, 2011, 10:57 am
Statistics: Posted by blewis — July 19th, 2011, 4:56 pm