PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
/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"];
}
?>
/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"];
}
?>
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"]; ?>
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest