Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
home
/
getwphos
/
public_html
/
radkingpanels
/
wp-content
/
plugins
/
poolax-core
/
inc
/
File Content:
poolaxajax.php
<?php /** * @Packge : Poolax * @Version : 1.0 * @Author : Themeholy * @Author URI : https://themeforest.net/user/themeholy * */ // Blocking direct access if( ! defined( 'ABSPATH' ) ) { exit; } function poolax_core_essential_scripts( ) { wp_enqueue_script('poolax-ajax',POOLAX_PLUGDIRURI.'assets/js/poolax.ajax.js',array( 'jquery' ),'1.0',true); wp_localize_script( 'poolax-ajax', 'poolaxajax', array( 'action_url' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'poolax-nonce' ), ) ); } add_action('wp_enqueue_scripts','poolax_core_essential_scripts'); // poolax Section subscribe ajax callback function add_action( 'wp_ajax_poolax_subscribe_ajax', 'poolax_subscribe_ajax' ); add_action( 'wp_ajax_nopriv_poolax_subscribe_ajax', 'poolax_subscribe_ajax' ); function poolax_subscribe_ajax( ){ $apiKey = poolax_opt('poolax_subscribe_apikey'); $listid = poolax_opt('poolax_subscribe_listid'); if( ! wp_verify_nonce($_POST['security'], 'poolax-nonce') ) { echo '<div class="alert alert-danger mt-2" role="alert">'.esc_html__('You are not allowed.', 'poolax').'</div>'; }else{ if( !empty( $apiKey ) && !empty( $listid ) ){ $MailChimp = new DrewM\MailChimp\MailChimp( $apiKey ); $result = $MailChimp->post("lists/{$listid}/members",[ 'email_address' => esc_attr( $_POST['sectsubscribe_email'] ), 'status' => 'subscribed', ]); if ($MailChimp->success()) { if( $result['status'] == 'subscribed' ){ echo '<div class="alert alert-success mt-2" role="alert">'.esc_html__('Thank you, you have been added to our mailing list.', 'poolax').'</div>'; } }elseif( $result['status'] == '400' ) { echo '<div class="alert alert-danger mt-2" role="alert">'.esc_html__('This Email address is already exists.', 'poolax').'</div>'; }else{ echo '<div class="alert alert-danger mt-2" role="alert">'.esc_html__('Sorry something went wrong.', 'poolax').'</div>'; } }else{ echo '<div class="alert alert-danger mt-2" role="alert">'.esc_html__('Apikey Or Listid Missing.', 'poolax').'</div>'; } } wp_die(); } add_action('wp_ajax_poolax_addtocart_notification','poolax_addtocart_notification'); add_action('wp_ajax_nopriv_poolax_addtocart_notification','poolax_addtocart_notification'); function poolax_addtocart_notification(){ $_product = wc_get_product($_POST['prodid']); $response = [ 'img_url' => esc_url( wp_get_attachment_image_src( $_product->get_image_id(),array('60','60'))[0] ), 'title' => wp_kses_post( $_product->get_title() ) ]; echo json_encode($response); wp_die(); }
Submit
FILE
FOLDER
Name
Size
Permission
Action
builder
---
0755
widgets
---
0755
MCAPI.class.php
16403 bytes
0644
poolaxajax.php
2936 bytes
0644
poolaxcore-functions.php
11809 bytes
0644
N4ST4R_ID | Naxtarrr