Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.
This repository was archived by the owner on May 6, 2021. It is now read-only.

Subscribe success page redirect uses post guid #80

Description

@leanwebstart

Guid's are not a good source of redirect URL... in time the actual domain/url of the page can change but the GUID by definition will not... this has caused me trouble in a site where we configured in a subdomain (staging.xxx.com) and then deployed... the guid stayed as staging.xxx.com...

In class_sendgrid_tools ...

 /**
   * Return the value for the signup confirmation page url
   *
   * @return  mixed   signup confirmation page url, false if the value is not found
   */
  public static function get_mc_signup_confirmation_page_url()
  {
    $page_id = self::get_mc_signup_confirmation_page();
    if ( false == $page_id or 'default' == $page_id ) {
      return false;
    }

    $confirmation_pages = get_pages( array( 'parent' => 0 ) );
    foreach ( $confirmation_pages as $key => $page ) {
      if ( $page->ID == $page_id ) {
        return $page->guid;
      }
    }

    return false;
  }

return $page->guid should be refactored...

I don't know wordpress much but would'nt get_permalink() be a better choice?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions