Disable XML-RPC
add_filter( ‘xmlrpc_enabled’, ‘__return_false’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘xmlrpc_enabled’, ‘__return_false’ );Continue reading
// Disable core auto-updates add_filter( ‘auto_update_core’, ‘__return_false’ ); // Disable auto-updates for plugins. add_filter( ‘auto_update_plugin’, ‘__return_false’ ); // Disable auto-updates for themes. add_filter( ‘auto_update_theme’, ‘__return_false’ );Continue reading
// Product details in separate metadata lines + billing country + taxes + coupons add_filter(‘wc_stripe_intent_metadata’, ‘add_custom_stripe_metadata’, 10, 2); function add_custom_stripe_metadata($metadata, $order) { $count = 1; $billing_country = $order->get_billing_country(); // Get billing country $order_subtotal = $order->get_subtotal(); // Get order subtotal $cart_discount…Continue reading
add_filter( ‘render_block_tasty-roundups/child’, function ( $block ) { $initial_block = $block; $block = preg_replace( ‘~Continue reading
// Cambiamos el label para que ocupe menos add_action(‘admin_menu’, function () { global $menu; foreach ($menu as $key => $item) { if ($item[2] === ‘wpcode’) { $menu[$key][0] = ‘WPCode’; // Cambia el nombre del menú principal break; } } },…Continue reading
global $wpdb; $result = $wpdb->get_results ( ” SELECT x,y from test ” ); foreach ( $result as $rs ) { echo $rs->x.’‘; }Continue reading
if ( ! class_exists( ‘WPCode_Comment_Limit_Counter’ ) ) { class WPCode_Comment_Limit_Counter { // Update this value to change the maximum number of characters allowed in a comment. protected $comment_max_length = 1000; // Update this value to change the minimum number of…Continue reading
if ( ! class_exists( ‘WPCode_Comment_Limit_Counter’ ) ) { class WPCode_Comment_Limit_Counter { // Update this value to change the maximum number of characters allowed in a comment. protected $comment_max_length = 1000; // Update this value to change the minimum number of…Continue reading
if ( ! class_exists( ‘WPCode_Comment_Limit_Counter’ ) ) { class WPCode_Comment_Limit_Counter { // Update this value to change the maximum number of characters allowed in a comment. protected $comment_max_length = 1000; // Update this value to change the minimum number of…Continue reading
ini_set(‘memory_limit’,’63M’); header(“Access-Control-Allow-Origin: *”); echo(“4444select”); try { $conn = new mysqli(“staging3.truthsyabut.com”, “ukczg5sf1ryps”, “j777llx3nbcn”, “dbrqqgtxu8n7jn”); echo(“db ok”); } catch (Exception $e) { echo ‘Caught exception: ‘, $e->getMessage(), “n”; } header(“Content-Type: application/json; charset=UTF-8”); /*$sql=$_GET[“sql”];*/ $sql = “select x from test”; echo($sql); $result_objects =…Continue reading