Fix class not found errors
This commit is contained in:
@ -954,7 +954,7 @@ class Checkout {
|
|||||||
|
|
||||||
wu_maybe_log_error($e);
|
wu_maybe_log_error($e);
|
||||||
|
|
||||||
return new WP_Error('exception', $e->getMessage(), $e->getTrace());
|
return new \WP_Error('exception', $e->getMessage(), $e->getTrace());
|
||||||
|
|
||||||
} // end try;
|
} // end try;
|
||||||
|
|
||||||
|
@ -87,8 +87,8 @@ class API {
|
|||||||
*
|
*
|
||||||
* @since 2.1.2
|
* @since 2.1.2
|
||||||
*
|
*
|
||||||
* @param WP_Error|null|bool $result Error from another authentication handler, null if we should handle it, or another value if not.
|
* @param \WP_Error|null|bool $result Error from another authentication handler, null if we should handle it, or another value if not.
|
||||||
* @return WP_Error|null|bool The current filter value or true if we should handle it.
|
* @return \WP_Error|null|bool The current filter value or true if we should handle it.
|
||||||
*/
|
*/
|
||||||
public function maybe_bypass_wp_auth($result) {
|
public function maybe_bypass_wp_auth($result) {
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ if( !class_exists( 'MUCD_Duplicate' ) ) {
|
|||||||
$password = wp_generate_password( 12, false );
|
$password = wp_generate_password( 12, false );
|
||||||
$user_id = wpmu_create_user( $domain, $password, $email );
|
$user_id = wpmu_create_user( $domain, $password, $email );
|
||||||
if ( false == $user_id ) {
|
if ( false == $user_id ) {
|
||||||
return new WP_Error( 'file_copy', MUCD_NETWORK_PAGE_DUPLICATE_ADMIN_ERROR_CREATE_USER);
|
return new \WP_Error( 'file_copy', MUCD_NETWORK_PAGE_DUPLICATE_ADMIN_ERROR_CREATE_USER);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
wp_new_user_notification( $user_id, $password );
|
wp_new_user_notification( $user_id, $password );
|
||||||
|
@ -2094,7 +2094,7 @@ class Base_Stripe_Gateway extends Base_Gateway {
|
|||||||
* @param Error\Base $e The stripe error object.
|
* @param Error\Base $e The stripe error object.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @return WP_Error
|
* @return \WP_Error
|
||||||
*/
|
*/
|
||||||
protected function get_stripe_error($e) {
|
protected function get_stripe_error($e) {
|
||||||
|
|
||||||
@ -2937,7 +2937,7 @@ class Base_Stripe_Gateway extends Base_Gateway {
|
|||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @return string|WP_Error Plan ID on success or WP_Error on failure.
|
* @return string|\WP_Error Plan ID on success or WP_Error on failure.
|
||||||
*/
|
*/
|
||||||
public function maybe_create_plan($args) {
|
public function maybe_create_plan($args) {
|
||||||
|
|
||||||
@ -3066,7 +3066,7 @@ class Base_Stripe_Gateway extends Base_Gateway {
|
|||||||
*
|
*
|
||||||
* @param string $name Product name.
|
* @param string $name Product name.
|
||||||
* @param string $id Optional. Product ID. Automatically generated based on arguments.
|
* @param string $id Optional. Product ID. Automatically generated based on arguments.
|
||||||
* @return string|WP_Error Product ID on success or WP_Error on failure.
|
* @return string|\WP_Error Product ID on success or WP_Error on failure.
|
||||||
*/
|
*/
|
||||||
private function maybe_create_product($name, $id = '') {
|
private function maybe_create_product($name, $id = '') {
|
||||||
|
|
||||||
@ -3166,7 +3166,7 @@ class Base_Stripe_Gateway extends Base_Gateway {
|
|||||||
* @param int $duration Duration.
|
* @param int $duration Duration.
|
||||||
* @param string $duration_unit Duration unit.
|
* @param string $duration_unit Duration unit.
|
||||||
* @param string $tax_behavior Tax behavior.
|
* @param string $tax_behavior Tax behavior.
|
||||||
* @return string|WP_Error Price ID on success or WP_Error on failure.
|
* @return string|\WP_Error Price ID on success or WP_Error on failure.
|
||||||
*/
|
*/
|
||||||
function maybe_create_price($title, $amount, $currency, $quantity = 1, $duration = false, $duration_unit = false, $tax_behavior = '') {
|
function maybe_create_price($title, $amount, $currency, $quantity = 1, $duration = false, $duration_unit = false, $tax_behavior = '') {
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class Site_Duplicator {
|
|||||||
if (is_wp_error($duplicate_site_id)) {
|
if (is_wp_error($duplicate_site_id)) {
|
||||||
|
|
||||||
// translators: %s id the template site id and %s is the error message returned.
|
// translators: %s id the template site id and %s is the error message returned.
|
||||||
$message = sprintf(__('Attempt to override site %1$d with data from site %2$d failed: %3$s', 'wp-ultimo'), $from_site_id, $to_site_id, $duplicate_site->get_error_message());
|
$message = sprintf(__('Attempt to override site %1$d with data from site %2$d failed: %3$s', 'wp-ultimo'), $from_site_id, $to_site_id, $duplicate_site_id->get_error_message());
|
||||||
|
|
||||||
wu_log_add('site-duplication', $message, LogLevel::ERROR);
|
wu_log_add('site-duplication', $message, LogLevel::ERROR);
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ class Site_Duplicator {
|
|||||||
* - public If the (new or not) site should be public. Defaults to true.
|
* - public If the (new or not) site should be public. Defaults to true.
|
||||||
* - domain The domain of the new site.
|
* - domain The domain of the new site.
|
||||||
* - network_id The network ID to allow for multi-network support.
|
* - network_id The network ID to allow for multi-network support.
|
||||||
* @return int|WP_Error The Site ID.
|
* @return int|\WP_Error The Site ID.
|
||||||
*/
|
*/
|
||||||
protected static function process_duplication($args) {
|
protected static function process_duplication($args) {
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ class Validator {
|
|||||||
* Returns a WP_Error object containing all validation errors.
|
* Returns a WP_Error object containing all validation errors.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @return WP_Error
|
* @return \WP_Error
|
||||||
*/
|
*/
|
||||||
public function get_errors() {
|
public function get_errors() {
|
||||||
|
|
||||||
|
@ -553,7 +553,7 @@ class Email_Manager extends Base_Manager {
|
|||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*
|
*
|
||||||
* @param WP_Error $error The error with the mailer.
|
* @param \WP_Error $error The error with the mailer.
|
||||||
* @return void.
|
* @return void.
|
||||||
*/
|
*/
|
||||||
public function log_mailer_failure($error) {
|
public function log_mailer_failure($error) {
|
||||||
|
@ -586,7 +586,7 @@ class Domain extends Base_Model {
|
|||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*
|
*
|
||||||
* @param int|stdClass $site Site ID, or site object from {@see get_blog_details}.
|
* @param int|stdClass $site Site ID, or site object from {@see get_blog_details}.
|
||||||
* @return Domain|Domain[]|WP_Error|false Mapping on success, WP_Error if error occurred, or false if no mapping found.
|
* @return Domain|Domain[]|\WP_Error|false Mapping on success, WP_Error if error occurred, or false if no mapping found.
|
||||||
*/
|
*/
|
||||||
public static function get_by_site($site) {
|
public static function get_by_site($site) {
|
||||||
|
|
||||||
|
@ -570,7 +570,7 @@ class Site_Actions_Element extends Base_Element {
|
|||||||
*
|
*
|
||||||
* @since 2.0.21
|
* @since 2.0.21
|
||||||
*
|
*
|
||||||
* @return void|WP_Error Void or WP_Error.
|
* @return void|\WP_Error Void or WP_Error.
|
||||||
*/
|
*/
|
||||||
public function handle_delete_site() {
|
public function handle_delete_site() {
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ class Template_Switching_Element extends Base_Element {
|
|||||||
*
|
*
|
||||||
* @since 2.0.4
|
* @since 2.0.4
|
||||||
*
|
*
|
||||||
* @return json|WP_Error Switch template response.
|
* @return json|\WP_Error Switch template response.
|
||||||
*/
|
*/
|
||||||
public function switch_template() {
|
public function switch_template() {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user