Wechat download 付费下载 1.1.0 has 33 actions and 131 filters, read directly from its source code on Nov 18, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Wechat download 付费下载 fires an action
add_action( 'wshop_flush_rewrite_rules', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Wechat download 付费下载 is about to use
add_filter( 'sanitize_key_ignorecase', function( $key, $raw_key ) {
// Change $key here.
return $key;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filter a sanitized key string. */ apply_filters( 'sanitize_key_ignorecase', $key, $raw_key ); -
apply_filters( "wshop_admin_page_{$this->id}", array() ); -
do_action( 'wshop_flush_rewrite_rules' ); -
apply_filters( 'xunhu_http_post_errcode', $httpStatusCode != 200, $httpStatusCode, $ch ); -
apply_filters( 'wshop_cart_item_validate', WShop_Error::success(), $this, $product, $qty ); -
apply_filters( 'wshop_download_fields', array( 'downloads'=>array( 'title'=>__('Downloads details',WSHOP), 'type'=>'custom', 'func'=>function($key,$api,$data){ $field = $api ->get_field_key($key); global $post; $download = new WShop_Download($post->ID); if(!$download->is_load()){ $download->post_ID = $post->ID; $download->insert(); } $downloads = $download->downloads; $downloads = $downloads?maybe_unserialize($downloads):null; if(!$d... ); -
do_action( "wshop_order_{$order->obj_type}_email_sections", $order ); -
do_action( 'wshop_order_email_sections', $order ); -
do_action( 'wshop_order_items_view_checkout_order_recieved_sections', $order ); -
apply_filters( 'wshop_price_atts', array( 'post_id'=>0, 'symbol'=>1 ) ); -
apply_filters( "wshop_shortcode_{$shortcode}", $shortcode ); -
apply_filters( 'xh_session_use_secure_cookie', false ); -
apply_filters( 'query_order_transaction', null, $order ); -
apply_filters( "query_order_transaction_{$payment_gateway->id}", $transaction_id, $order ); -
apply_filters( "wshop_{$order->section}_order_item_creator", $order_item_creator, $order, $item ); -
apply_filters( "wshop_{$post_type}_order_item_creator", $order_item_creator, $order, $item ); -
apply_filters( "wshop_{$post->post_type}_process_object_update", $error, $product ); -
apply_filters( "wshop_{$this->get_table_name()}_property_{$property}", isset($this->{$property})?$this->{$property}:$default ); -
apply_filters( 'wshop_account_my_orders_atts', array( 'pageSize'=>20, 'location'=>null ) ); -
do_action( 'wshop_admin_enqueue_scripts' ); -
do_action( "wshop_admin_options_header_{$this->id}" ); -
apply_filters( 'wshop_admin_pages', array( 10=> WShop_Page_Order::instance(), 50=> WShop_Page_Default::instance(), 100=> WShop_Page_Add_Ons::instance() ) ); -
apply_filters( 'wshop_after_change_order_status', $this->add_note( WShop_Order_Note::Note_Type_Customer, sprintf(__('Order status changed from %s to %s.',WSHOP),self::get_status_name($old_status),self::get_status_name($new_status)) ), $new_status, $old_status, $this ); -
do_action( 'wshop_after_init' ); -
apply_filters( 'wshop_ajax', $shortcodes ); -
apply_filters( 'wshop_async_load', $content, $atts ); -
apply_filters( "wshop_async_load_{$params['hook']}", $atts, $params['content'] ); -
apply_filters( 'wshop_captcha', function(){ require_once WSHOP_DIR.'/includes/captcha/CaptchaBuilderInterface.php'; require_once WSHOP_DIR.'/includes/captcha/PhraseBuilderInterface.php'; require_once WSHOP_DIR.'/includes/captcha/CaptchaBuilder.php'; require_once WSHOP_DIR.'/includes/captcha/PhraseBuilder.php'; $action ='wshop_captcha'; $params=shortcode_atts(array( 'notice_str'=>null, 'action'=>$action, $action=>null, 'hash'=... ); -
apply_filters( 'wshop_captcha_fields', $fields ); -
apply_filters( 'wshop_checkout_cart', array(), $context ); -
apply_filters( 'wshop_checkout_options_1', array( 'enable_guest_checkout'=>array( 'title'=>__('Enable guest checkout',WSHOP), 'type'=>'checkbox', 'default'=>'yes', 'description'=>__('Allows customers to checkout without creating an account.',WSHOP) ), 'order_expire_minute'=>array( 'title'=>__('Order Expire(minute)',WSHOP), 'type'=>'text', 'default'=>'30', 'description'=>__('When order expired,can not be paid again.(If set null or 0,orde... ); -
apply_filters( 'wshop_checkout_options_2', array( 'modal_title'=>array( 'title'=>__('Checkout modal',WSHOP), 'type'=>'subtitle' ), 'modal'=>array( 'title'=>__('Modal',WSHOP), 'type'=>'section', 'options'=>array( 'shopping_list'=>'弹窗+支付按钮跳转', ) ), 'enable_inventory'=>array( 'tr_css'=>'section-modal section-shopping_cart', 'title'=>__('Enable inventory',WSHOP), 'type'=>'checkbox' ) ) ); -
apply_filters( 'wshop_checkout_options_3', array() ); -
do_action( 'wshop_checkout_order_pay_btn', $request ); -
do_action( 'wshop_checkout_order_pay_payments', $context ); -
do_action( 'wshop_checkout_order_pay_shopping_cart', $context ); -
apply_filters( 'wshop_checkout_pay_uri', $url, $this ); -
apply_filters( 'wshop_checkout_payment_gateways', array(), $context ); -
do_action( "wshop_checkout_tab_{$tab}", $request ); -
apply_filters( 'wshop_complete_payment', WShop_Error::success(), $this ); -
apply_filters( 'wshop_create_order', new WShop_Order(), $this ); -
do_action( 'wshop_cron' ); -
apply_filters( 'wshop_currencies', array( 'AED' => __( 'United Arab Emirates dirham', WSHOP ), 'AFN' => __( 'Afghan afghani', WSHOP ), 'ALL' => __( 'Albanian lek', WSHOP ), 'AMD' => __( 'Armenian dram', WSHOP ), 'ANG' => __( 'Netherlands Antillean guilder', WSHOP ), 'AOA' => __( 'Angolan kwanza', WSHOP ), 'ARS' => __( 'Argentine peso', WSHOP ), 'AUD' => __( 'Australian dollar', WSHOP ), 'AWG' => __( 'Aruban florin', WSHOP ), 'AZ... ); -
apply_filters( 'wshop_currency_symbol', $currency_symbol, $currency ); -
apply_filters( 'wshop_currency_symbols', array( 'AED' => 'د.إ', 'AFN' => '؋', 'ALL' => 'L', 'AMD' => 'AMD', 'ANG' => 'ƒ', 'AOA' => 'Kz', 'ARS' => '$', 'AUD' => '$', 'AWG' => 'ƒ', 'AZN' => 'AZN', 'BAM' => 'KM', 'BBD' => '$', 'BDT' => '৳ ', 'BGN' => 'лв.', 'BHD' => '.د.ب', 'BIF' => 'Fr', 'BMD' => '$', 'BND' => '$', 'BOB' => 'Bs.', 'BRL' => 'R$', '... ); -
apply_filters( 'wshop_download_default', $_content ); -
apply_filters( 'wshop_download_properties', array( 'post_ID'=>0, 'downloads'=>null ) ); -
apply_filters( 'wshop_download_types', array( 'general' => array( 'title' => '简化', 'call' => function ($field, $download) { $content = $download->downloads['type'] == 'general' ? $download->downloads['content'] : []; if ($content) { $content = json_decode($content,true); }else{ $content = [ 'type'=>'百度网盘', 'type1'=>'', 'type2'=>'', 'url'=>'https://pan.baidu.com', 'code'=>'XXXX', 'url1'=>'', 'code1'=>'', 'url2'=>'', 'code... ); -
do_action( 'wshop_email_init' ); -
apply_filters( 'wshop_enable_async', isset($request['async'])?intval($request['async']):0, $request ); -
apply_filters( 'wshop_enable_guest', WShop_Settings_Checkout_Options::instance()->get_option('enable_guest_checkout','yes')==='yes' ); -
apply_filters( 'wshop_enable_inventory', WShop_Settings_Checkout_Options::instance()->get_option('enable_inventory')==='yes', $post ); -
apply_filters( "wshop_endpoint_checkout_{$key}", $atts, $content ); -
do_action( "wshop_form_list_column_{$column_name}", $item ); -
apply_filters( 'wshop_format_price', '%01.2f' ); -
apply_filters( 'wshop_get_template', $page_template_dir . '/templates/' . $page_template, $page_template_dir, $page_template ); -
do_action( 'wshop_init' ); -
do_action( 'wshop_init_before' ); -
apply_filters( 'wshop_js_on_error', 'alert' ); -
do_action( 'wshop_loaded' ); -
apply_filters( "wshop_obj_search_{$type}", null, $type, $keywords, $post_ID ); -
apply_filters( 'wshop_object_post', array( 'ID'=>0, 'post_date'=>null, 'post_date_gmt'=>null, 'post_name'=>'', 'post_modified'=>null, 'post_modified_gmt'=>null, 'post_author' => 0, 'post_content' => '', 'post_content_filtered' => '', 'post_title' => '', 'post_excerpt' => '', 'post_status' => 'draft', 'post_type' => 'post', 'post_mime_type'=>null, 'comment_status' => '', 'comment_count'=>0, 'filter'=>null, 'post'=>null, 'ping_stat... ); -
do_action( 'wshop_on_update', $version ); -
apply_filters( 'wshop_online_post_types', $types ); -
apply_filters( "wshop_order_{$order->obj_type}_email_new_order", $calls, $order ); -
apply_filters( "wshop_order_{$order->obj_type}_email_received", $calls, $order ); -
apply_filters( "wshop_order_{$order->section}_created", WShop_Error::success(), $order, $this ); -
apply_filters( "wshop_order_{$order->section}_email_new_order", $calls, $order ); -
apply_filters( "wshop_order_{$order->section}_email_received", $calls, $order ); -
apply_filters( "wshop_order_{$this->obj_type}_back_url", $back_url, $this ); -
apply_filters( "wshop_order_{$this->obj_type}_complete_payment_args", $args, $this, $transaction_id ); -
apply_filters( "wshop_order_{$this->obj_type}_complete_payment_status", $status_complete_payment, $this, $transaction_id ); -
apply_filters( "wshop_order_{$this->obj_type}_email_receiver", $email, $this ); -
apply_filters( "wshop_order_{$this->obj_type}_received_url", $received_url, $this ); -
apply_filters( "wshop_order_{$this->obj_type}_review_url", $review_url, $this ); -
apply_filters( "wshop_order_{$this->section}_back_url", $back_url, $this ); -
apply_filters( "wshop_order_{$this->section}_complete_payment_args", $args, $this, $transaction_id ); -
apply_filters( "wshop_order_{$this->section}_complete_payment_status", $status_complete_payment, $this, $transaction_id ); -
apply_filters( "wshop_order_{$this->section}_email_receiver", $email, $this ); -
apply_filters( "wshop_order_{$this->section}_received_url", $received_url, $this ); -
apply_filters( "wshop_order_{$this->section}_review_url", $review_url, $this ); -
apply_filters( 'wshop_order_back_url', $back_url, $this ); -
apply_filters( 'wshop_order_complete_payment_args', array( 'join'=>array( 'core'=>$join, ), 'set'=>array( 'core'=>$set ), 'where'=>array( 'core'=>$where ), 'prepare'=>array(), 'executed'=>array() ), $this, $transaction_id ); -
apply_filters( 'wshop_order_complete_payment_args_default', array_merge(array( 'status'=>$status_complete_payment, 'transaction_id'=>$transaction_id, 'paid_date'=>current_time('timestamp'), 'sn'=>$this->sn ),$update_properties), $this, $transaction_id ); -
apply_filters( 'wshop_order_complete_payment_status', self::Complete, $this, $transaction_id ); -
apply_filters( 'wshop_order_created', WShop_Error::success(), $order, $this ); -
apply_filters( 'wshop_order_email_new_order', array(function($order){ $user_email = $order->get_email_receiver(); if(!is_email($user_email)){ $user_email=null; } $settings = array( '{email:customer}'=>$user_email, '{order_number}'=>$order->id, '{order_date}'=>date('Y-m-d H:i',$order->paid_date) ); $content =WShop::instance()->WP->requires( WSHOP_DIR, "emails/new-order.php", array('order'=>$order) ); $email =new WShop_Email('new-order'); re... ); -
apply_filters( 'wshop_order_email_received', array(function($order){ $user_email = $order->get_email_receiver(); if(!is_email($user_email)){ $user_email=null; } $settings = array( '{email:customer}'=>$user_email, '{order_number}'=>$order->id, '{order_date}'=>date('Y-m-d H:i',$order->paid_date) ); $content =WShop::instance()->WP->requires( WSHOP_DIR, "emails/order-received.php", array('order'=>$order) ); $email = new WShop_Email('order-rec... ); -
apply_filters( 'wshop_order_email_receiver', $email, $this ); -
apply_filters( 'wshop_order_extra_amount', WShop_Error::success(), $order, $this ); -
apply_filters( 'wshop_order_free_args', array( 'join'=>array_merge(array( 'core'=>$join ),$args['join']), 'set'=>array_merge(array( 'core'=>$set ),$args['set']), 'where'=>array_merge(array( 'core'=>$where ),$args['where']), 'prepare'=>$args['prepare'], 'executed'=>$args['executed'] ) ); -
apply_filters( 'wshop_order_free_args_default', array( 'status'=>self::Canceled ) ); -
apply_filters( 'wshop_order_generate_sn', $prefix.$time.'-'.str_pad($this->id,4,'0',STR_PAD_LEFT) ); -
apply_filters( 'wshop_order_is_canceled', in_array($this->status, array( self::Canceled )) ); -
apply_filters( 'wshop_order_is_paid', in_array($this->status, array( self::Processing, self::Complete )) ); -
apply_filters( 'wshop_order_is_pending', in_array($this->status, array( self::Pending )) ); -
apply_filters( 'wshop_order_is_unconfirmed', in_array($this->status, array( self::Unconfirmed )) ); -
apply_filters( "wshop_order_item_{$order->obj_type}_created", WShop_Error::success(), $order_item, $order, $this ); -
apply_filters( 'wshop_order_item_created', WShop_Error::success(), $order_item, $order, $this ); -
apply_filters( 'wshop_order_item_creator', function($order,$item){ $product =$item['product']; $order_item =new WShop_Order_Item(); $order_item->price = $product->get_single_price(false); $order_item->qty =$item['qty']; $order_item->inventory = $item['qty']; $order_item->post_ID = $product->post_ID; $order_item->metas =array( 'title'=>$product->get_title(), 'img'=>$product->get_img(), 'link'=>$product->get_link(), 'post_type'=>$product-... ); -
apply_filters( 'wshop_order_item_get_subtotal', $amount, $this, $symbol ); -
apply_filters( 'wshop_order_item_properties', array( 'id'=>0, 'order_id'=>$this->id, 'qty'=>1, 'inventory'=>1, 'price'=>0.00, 'post_ID'=>null, 'currency'=>WShop::instance()->payment->get_currency(), 'metas'=>array() ) ); -
apply_filters( 'wshop_order_order_ordered', WShop_Error::success(), $this ); -
apply_filters( 'wshop_order_pre_order_ordered', WShop_Error::success(), $this ); -
apply_filters( 'wshop_order_properties', array( 'id'=>null, 'sn'=>null, 'total_amount'=>0, 'extra_amount'=>array(), 'obj_type'=>null, 'section'=>null, 'payment_method'=>null, 'cookie_id'=>null, 'order_date'=>$now, 'expire_date'=>$expire_date, 'exchange_rate'=>0, 'paid_date'=>null, 'transaction_id'=>null, 'currency'=>$currency, 'customer_id'=>null, 'ip'=>$ip, 'status'=>self::Unconfirmed, 'removed'=>0, 'metas'=>array() ) ); -
apply_filters( 'wshop_order_received_url', $received_url, $this ); -
apply_filters( 'wshop_order_review_url', $review_url, $this ); -
apply_filters( 'wshop_order_title', $title, $this ); -
apply_filters( 'wshop_order_total_amount_before', $order->total_amount, $order, $this ); -
apply_filters( 'wshop_order_total_amount_final', $order->total_amount, $order, $this ); -
do_action( 'wshop_order_view_admin_order_detail_general', $order ); -
do_action( 'wshop_order_view_admin_order_detail_order_data_column', $order ); -
apply_filters( 'wshop_order_waitting_payment_status', $this->get_waitting_order_status(), $this, $transaction_id ); -
apply_filters( 'wshop_page_templates', array( WSHOP_DIR=>array( 'page/checkout.php'=>__('WShop - Checkout',WSHOP), ) ) ); -
apply_filters( 'wshop_pages', $menus ); -
apply_filters( 'wshop_pay_per_view_fields', array( 'contents' => array( 'title' => '打赏', 'type' => 'custom', 'func' => function ($key, $api, $data) { ?> <tr valign="top" class=""> <th scope="row" class="titledesc"> <label>提示</label> </th> <td class="forminp"> <fieldset> <legend class="screen-reader-text"> <span>提示</span> </legend> <p class="description"> 须将打赏短码插入文章后才会生效! <a href="javascript:void(... ); -
apply_filters( 'wshop_payments', array() ); -
apply_filters( 'wshop_post_types', $types ); -
do_action( "wshop_process_admin_options_validate_{$this->id}" ); -
apply_filters( 'wshop_process_object_update', $error, $product ); -
apply_filters( 'wshop_product_desc', $this->post->post_excerpt, $this ); -
apply_filters( 'wshop_product_fields0', $settings, $post, $this ); -
apply_filters( 'wshop_product_fields1', $settings, $post, $this ); -
apply_filters( 'wshop_product_fields2', $settings, $post, $this ); -
apply_filters( 'wshop_product_img', $thumb&&count($thumb)>0?$thumb[0]:WSHOP_URL.'/assets/image/default.png', $this ); -
apply_filters( 'wshop_product_link', get_post_permalink($this->post->ID), $this ); -
apply_filters( 'wshop_product_properties', array( 'post_ID'=>0, 'inventory'=>null, 'sale_qty'=>0, 'sale_price'=>0 ), $this ); -
apply_filters( 'wshop_product_shopping_cart_item_html', null, $this, $shopping_cart, $qty, $context ); -
apply_filters( 'wshop_product_single_price', $osale_price, $this->post, $this ); -
apply_filters( 'wshop_product_single_price_html', $sale_price, $osale_price, $symbol, $this ); -
apply_filters( 'wshop_product_title', $this->post->post_title, $this ); -
do_action_ref_array( 'wshop_purchase_modal_shopping_cart_create_order', array(&$cart) ); -
do_action( 'wshop_register_activation_hook' ); -
do_action( 'wshop_register_deactivation_hook' ); -
apply_filters( 'wshop_require_dir', $dir, $templete_name ); -
apply_filters( 'wshop_reward_fields', $fields ); -
apply_filters( 'wshop_reward_post_types', $types ); -
apply_filters( "wshop_settings_api_form_fields_{$this->id}", $this->form_fields ); -
apply_filters( 'wshop_settings_basic', $form_fields ); -
do_action_ref_array( 'wshop_shopping_cart_item_added', array(&$this,$product) ); -
apply_filters( 'wshop_shopping_cart_properties', array( 'customer_id'=>null, 'obj_type'=>null, 'order_id'=>null, 'items'=>array(), 'metas'=>array(), 'payment_method'=>null, 'created_time'=>current_time( 'timestamp' ), 'coupons'=>array() ) ); -
apply_filters( 'wshop_shortcodes', $shortcodes ); -
apply_filters( 'wshop_unlimit_roles', array() ); -
apply_filters( 'wshop_user_pages', array( 10=> WShop_User_Page_Order::instance() ) ); -
do_action( 'wshop_wp_enqueue_scripts' ); -
apply_filters( 'wshop_wp_reset_payments', array() ); -
apply_filters( 'xh_session_expiration', 60 * 60 * 48 ); -
apply_filters( 'xh_session_expiring', 60 * 60 * 47 ); -
do_action( "xh_social_admin_options_header_{$this->id}" ); -
apply_filters( 'xh_uc_endpoint_title', $this->endpoint_settings[$page][$endpoint]['page_title'], $endpoint, $page ); -
apply_filters( 'xh_wechat_get_access_token', $call, $this ); -
apply_filters( 'xh_wechat_get_jsapi_ticket', function($api){ $accessToken = $api->access_token(); if($accessToken instanceof WShop_Error){ return $accessToken; } $response =WShop_Helper_Http::http_get ( "https://api.weixin.qq.com/cgi-bin/ticket/getticket?type=jsapi&access_token={$accessToken}" ); $error = new WShop_Wechat_Error($api->appid,$api ->appsecret,$api->crossdomain_url); $obj = $error->validate($response); $api->set('jsapi_ticket... ); -
apply_filters( 'xh_wechat_get_openid', null, $this ); -
apply_filters( 'xh_wechat_get_wechat', null, $this ); -
do_action( 'xh_wechat_token' ); -
apply_filters( 'xh_wechat_token_get', null, $id ); -
do_action( 'xh_wechat_token_set', $id, $data ); -
do_action( 'xunhuweb_cron' );
Generated from Wechat download 付费下载's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: