WP Stripe
Conflict with https/ssl and WP_PLUGIN_URL (1 post)

  1. Per http://core.trac.wordpress.org/ticket/13941 - the old constants don't work with SSL.

    To make this work on an SSL site, I had to add in this:

    if (isset($_SERVER['HTTPS'])) {
            define( 'WP_PLUGIN_URL', 'https://'.$_SERVER['HTTP_HOST'].'/wp-content/plugins' );

    Would it be possible to change the call to WP_PLUGIN_URL to plugin_dir_url() instead?

    The code is here: http://plugins.trac.wordpress.org/browser/wp-stripe/trunk/wp-stripe.php#L15

    define ( 'WP_STRIPE_PATH', WP_PLUGIN_URL . '/' . end( explode( DIRECTORY_SEPARATOR, dirname( __FILE__ ) ) ) );

    would become:

    define ( 'WP_STRIPE_PATH', plugin_dir_url() );

    (plugin_dir_url() calls plugin_url(), but since you just want the URL of the plugin, and not a sub file, plugin_dir_url() seemed more appropriate. If you were calling subfiles, like for jquery, it'd be plugins_url( 'js/fartscroll.js' , __FILE__ ) instead - and I know Noel already knows this, but now people reading do too! ;) )


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Stripe
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by Ipstenu (Mika Epstein)
  • This topic is not resolved
  • WordPress version: 3.6


No tags yet.