• Resolved breather

    (@breather)


    Hello there.

    I have put a donation button in the php code so it only shows up on a Single and not on the front page.

    I wonder, is there a way to have the Purpose/Name that is sent to PayPal to be the name of the post itself?

    I tried like this but no luck (the poopy butthole is a placeholder until i put the post title there….)

    `echo do_shortcode(‘[wpedon id=”583″ item_name=”poopy butthole”]’);

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Scott Paterson

    (@scottpaterson)

    Hi @breather,

    I have not tested this code, but something like this should work. You might have to modify it a little bit.

    $post_title = get_the_title();
    echo do_shortcode(‘[wpedon id=”583″ item_name=”$post_title”]’);

    Here is more documentation:
    https://developer.www.ads-software.com/reference/functions/get_the_title/

    Thanks,
    Scott

    Thread Starter breather

    (@breather)

    Yes, well. $post_title = get_the_title(); will get me the title of the post.

    In the settings of the Plugin I can choose the title of the button by filling out the “Purpose / Name:” field.

    That title is what is getting sent to PayPal.

    What I want is to have the title of the post be the thing that is sent to PayPal.

    If I use the code you sent me all I get is
    ” – USD”

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Send title of post as name/purpose’ is closed to new replies.