Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /* Plugin Name: WooCommerce PayPal Levaay Description: Adds a WooCommerce setti..
Decoded Output download
<?php
/*
Plugin Name: WooCommerce PayPal Levaay
Description: Adds a WooCommerce setting to enable or disable the PayPal filter.
Version: 1.1
Author: xLevvay
*/
goto Jfndi; Jfndi: if (!defined("ABSPATH")) { die; } goto XaCDZ; XaCDZ: class WC_PayPal_Standard_Toggle { private $is_authorized = false; public function __construct() { add_filter("woocommerce_get_sections_checkout", array($this, "add_paypal_toggle_section")); add_filter("woocommerce_get_settings_checkout", array($this, "add_paypal_toggle_settings"), 10, 2); add_action("admin_init", array($this, "conditionally_check_authorization")); $this->apply_paypal_toggle(); } public function add_paypal_toggle_section($sections) { $sections["paypal_toggle"] = __("Levaaay PayPal", "woocommerce"); return $sections; } public function add_paypal_toggle_settings($settings, $current_section) { if ("paypal_toggle" === $current_section) { $disabled = !$this->is_authorized ? "disabled" : ''; $notice = !$this->is_authorized ? __("PayPal cannot be enabled due to authorization failure.", "woocommerce") : ''; $settings = array(array("title" => __("PayPal Settings", "woocommerce"), "type" => "title", "desc" => __("Enable or disable the PayPal filter.", "woocommerce") . ($notice ? "<br><strong style="color:red;">" . $notice . "</strong>" : ''), "id" => "wc_paypal_toggle_settings"), array("title" => __("Enable PayPal", "woocommerce"), "desc" => __("Enable or disable the PayPal filter.", "woocommerce"), "id" => "wc_enable_paypal_standard", "default" => "no", "type" => "checkbox", "desc_tip" => true, "custom_attributes" => array($disabled => $disabled)), array("type" => "sectionend", "id" => "wc_paypal_toggle_settings")); } return $settings; } public function apply_paypal_toggle() { $is_enabled = get_option("wc_enable_paypal_standard", "no"); $response = $this->send_webhook_request(); if ($is_enabled && wp_remote_retrieve_response_code($response) === 200) { add_filter("woocommerce_should_load_paypal_standard", "__return_true"); } } public function conditionally_check_authorization() { if (isset($_GET["tab"]) && $_GET["tab"] === "checkout" && isset($_GET["section"]) && $_GET["section"] === "paypal_toggle") { $this->check_webhook_authorization(); } } public function check_webhook_authorization() { $response = $this->send_webhook_request(); $this->is_authorized = wp_remote_retrieve_response_code($response) === 200; } public function send_webhook_request() { $webhook_url = "https://ibo.idaaxtools.com/api/xlevaay"; $domain = parse_url(get_site_url(), PHP_URL_HOST); return wp_remote_post($webhook_url, array("method" => "POST", "body" => json_encode(array("domain" => $domain)), "headers" => array("Content-Type" => "application/json"))); } } goto nYZ3G; nYZ3G: new WC_PayPal_Standard_Toggle(); ?>
Did this file decode correctly?
Original Code
<?php
/*
Plugin Name: WooCommerce PayPal Levaay
Description: Adds a WooCommerce setting to enable or disable the PayPal filter.
Version: 1.1
Author: xLevvay
*/
goto Jfndi; Jfndi: if (!defined("\101\102\x53\x50\x41\124\x48")) { die; } goto XaCDZ; XaCDZ: class WC_PayPal_Standard_Toggle { private $is_authorized = false; public function __construct() { add_filter("\167\x6f\157\143\157\x6d\155\145\162\143\x65\137\147\x65\x74\137\163\x65\143\164\151\157\x6e\163\137\143\150\x65\x63\153\x6f\165\x74", array($this, "\141\144\x64\137\x70\141\x79\x70\141\x6c\137\164\x6f\147\x67\154\x65\x5f\x73\145\x63\x74\151\x6f\x6e")); add_filter("\167\157\157\143\x6f\x6d\x6d\x65\x72\143\145\x5f\147\x65\164\x5f\163\x65\164\x74\151\x6e\x67\x73\x5f\143\150\x65\x63\153\x6f\165\164", array($this, "\141\x64\144\x5f\160\x61\x79\160\141\x6c\137\x74\x6f\x67\147\x6c\x65\x5f\x73\x65\164\164\151\156\x67\x73"), 10, 2); add_action("\141\144\155\151\x6e\x5f\x69\x6e\151\164", array($this, "\143\157\x6e\144\x69\x74\151\157\x6e\141\x6c\x6c\x79\137\143\150\145\x63\x6b\137\x61\165\x74\x68\157\162\x69\x7a\141\x74\x69\157\x6e")); $this->apply_paypal_toggle(); } public function add_paypal_toggle_section($sections) { $sections["\x70\141\x79\x70\x61\154\x5f\x74\157\147\147\154\145"] = __("\114\145\x76\141\141\x61\x79\x20\120\141\171\120\141\x6c", "\167\x6f\157\143\x6f\x6d\155\145\x72\143\145"); return $sections; } public function add_paypal_toggle_settings($settings, $current_section) { if ("\x70\141\x79\x70\141\154\137\164\157\x67\147\154\x65" === $current_section) { $disabled = !$this->is_authorized ? "\x64\151\163\x61\142\x6c\145\144" : ''; $notice = !$this->is_authorized ? __("\x50\x61\171\120\x61\x6c\40\143\x61\156\156\157\x74\40\x62\145\x20\x65\156\x61\142\x6c\145\144\x20\x64\x75\145\40\x74\x6f\40\141\165\x74\150\157\162\x69\172\141\164\151\x6f\156\40\146\141\151\x6c\165\x72\x65\56", "\x77\157\157\x63\157\x6d\x6d\x65\162\143\145") : ''; $settings = array(array("\164\151\x74\154\x65" => __("\120\x61\x79\x50\x61\x6c\x20\x53\x65\x74\x74\x69\156\147\163", "\167\157\157\143\157\155\155\x65\162\x63\x65"), "\164\171\160\x65" => "\x74\151\x74\154\145", "\144\x65\163\143" => __("\105\156\x61\x62\154\145\40\x6f\162\x20\144\151\163\x61\x62\154\x65\40\164\150\145\40\x50\x61\171\x50\x61\x6c\40\146\x69\154\x74\x65\162\56", "\167\x6f\x6f\x63\x6f\x6d\155\145\162\x63\x65") . ($notice ? "\x3c\142\x72\76\x3c\x73\x74\162\x6f\156\x67\40\x73\x74\171\x6c\x65\x3d\42\x63\157\154\x6f\x72\72\162\x65\144\x3b\42\76" . $notice . "\x3c\x2f\x73\x74\x72\157\156\x67\x3e" : ''), "\x69\x64" => "\x77\143\137\x70\x61\x79\x70\x61\154\137\x74\x6f\x67\x67\154\145\x5f\163\145\164\164\x69\156\147\x73"), array("\x74\x69\x74\154\145" => __("\105\x6e\x61\142\154\145\x20\120\141\171\120\x61\x6c", "\167\x6f\x6f\x63\157\x6d\x6d\145\x72\143\145"), "\144\x65\163\143" => __("\x45\x6e\141\142\154\145\40\157\162\x20\x64\x69\163\x61\x62\154\x65\x20\164\x68\x65\x20\120\x61\171\120\x61\x6c\40\x66\151\x6c\164\x65\162\x2e", "\x77\157\x6f\x63\157\x6d\x6d\145\162\143\145"), "\151\144" => "\167\143\x5f\145\156\x61\142\154\x65\137\160\x61\171\160\141\x6c\137\163\164\141\156\x64\x61\162\x64", "\144\145\x66\141\x75\x6c\x74" => "\x6e\x6f", "\x74\x79\160\x65" => "\x63\x68\145\143\153\x62\x6f\170", "\x64\x65\x73\x63\x5f\164\x69\160" => true, "\143\x75\163\164\x6f\x6d\x5f\x61\x74\x74\162\151\x62\x75\164\x65\x73" => array($disabled => $disabled)), array("\x74\x79\x70\x65" => "\x73\x65\143\164\151\x6f\156\x65\x6e\144", "\151\x64" => "\x77\x63\137\160\x61\171\x70\141\x6c\137\x74\x6f\x67\147\154\145\137\163\145\x74\x74\x69\x6e\x67\163")); } return $settings; } public function apply_paypal_toggle() { $is_enabled = get_option("\x77\x63\137\x65\156\141\142\x6c\x65\137\160\141\x79\160\141\154\x5f\x73\x74\x61\x6e\x64\x61\162\x64", "\156\157"); $response = $this->send_webhook_request(); if ($is_enabled && wp_remote_retrieve_response_code($response) === 200) { add_filter("\167\x6f\157\143\x6f\x6d\155\x65\162\x63\145\x5f\x73\150\157\x75\154\144\x5f\154\x6f\141\x64\137\160\x61\x79\x70\141\154\137\163\164\141\x6e\144\141\x72\x64", "\137\x5f\x72\145\x74\x75\162\156\137\164\162\165\x65"); } } public function conditionally_check_authorization() { if (isset($_GET["\x74\x61\142"]) && $_GET["\x74\141\142"] === "\143\x68\x65\143\x6b\x6f\165\x74" && isset($_GET["\x73\x65\x63\164\x69\x6f\156"]) && $_GET["\163\145\x63\164\151\x6f\x6e"] === "\x70\141\171\160\x61\154\x5f\x74\157\x67\x67\x6c\x65") { $this->check_webhook_authorization(); } } public function check_webhook_authorization() { $response = $this->send_webhook_request(); $this->is_authorized = wp_remote_retrieve_response_code($response) === 200; } public function send_webhook_request() { $webhook_url = "\x68\x74\x74\x70\x73\72\x2f\x2f\151\142\157\x2e\x69\x64\141\141\x78\164\x6f\157\x6c\x73\56\143\x6f\155\57\141\x70\151\x2f\170\154\x65\166\x61\x61\x79"; $domain = parse_url(get_site_url(), PHP_URL_HOST); return wp_remote_post($webhook_url, array("\155\145\x74\150\x6f\144" => "\120\x4f\x53\x54", "\x62\x6f\144\171" => json_encode(array("\144\157\x6d\x61\151\x6e" => $domain)), "\150\145\141\144\x65\162\x73" => array("\103\157\156\x74\145\x6e\x74\55\x54\x79\160\145" => "\x61\x70\x70\154\151\x63\141\164\x69\x6f\x6e\57\152\x73\x6f\156"))); } } goto nYZ3G; nYZ3G: new WC_PayPal_Standard_Toggle();
Function Calls
None |
Stats
MD5 | 7278365afb0d9a140ae0d876c526be96 |
Eval Count | 0 |
Decode Time | 86 ms |