From 26005452f796ab4cef9ec0b9c7bc5ba30f53e0ef Mon Sep 17 00:00:00 2001 From: kurund Date: Thu, 16 Apr 2015 22:51:56 -0700 Subject: [PATCH] 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 --- CRM/Core/Permission/WordPress.php | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.25.1