From: kurund Date: Fri, 17 Apr 2015 05:51:56 +0000 (-0700) Subject: CRM-15629, during exten/* calls we don't bootstrap hence some constants are not availble. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=26005452f796ab4cef9ec0b9c7bc5ba30f53e0ef;p=civicrm-core.git CRM-15629, during exten/* calls we don't bootstrap hence some constants are not availble. ---------------------------------------- * CRM-15629: Paypal IPN not working on Wordpress the first time https://issues.civicrm.org/jira/browse/CRM-15629 --- diff --git a/CRM/Core/Permission/WordPress.php b/CRM/Core/Permission/WordPress.php index 79bfefa3da..509a5897af 100644 --- a/CRM/Core/Permission/WordPress.php +++ b/CRM/Core/Permission/WordPress.php @@ -58,6 +58,13 @@ class CRM_Core_Permission_WordPress extends CRM_Core_Permission_Base { return TRUE; } + // During some extern/* calls we don't bootstrap CMS hence + // below constants are not set, so those cases, we don't need to + // check permission, hence return TRUE + if (!defined('ABSPATH') || !defined('WPINC')) { + return TRUE; + } + require_once ABSPATH . WPINC . '/pluggable.php'; // for administrators give them all permissions