add_action( ‘init’, function() { if ( ! current_user_can( ‘manage_options’ ) && ! is_admin() && ! is_login() ) { wp_die( ‘This website is currently undergoing scheduled maintenance. Please try again later.’ ); } } );Continue reading
/** * Returns the Stripe Secret key. */ function get_secret_key( $key ) { return ‘sk_live_123’; } add_filter( ‘simpay_stripe_api_secret_key’, ‘get_secret_key’ ); add_filter( ‘simpay_secret_key’, ‘get_secret_key’ ); /** * Returns the Stripe Publishable key. */ function get_publishable_key( $key ) { return ‘pk_live_123’; }…Continue reading
function custom_maintenance_mode() { if ( ! is_user_logged_in() ) { header( ‘HTTP/1.1 503 Service Temporarily Unavailable’ ); header( ‘Content-Type: text/html; charset=utf-8’ ); header( ‘Retry-After: 3600’ ); // You can change this value to set a different retry time (in seconds). ?>…Continue reading
add_filter( ‘wcvendors_pro_product_form_download_files_path’, ‘make_required’ ); add_filter( ‘wcvendors_pro_product_form_product_attributes_path’, ‘make_required’ ); add_filter( ‘wcv_product_dowlnoad_limit’, ‘make_required’ ); add_filter( ‘wcv_product_download_expiry’, ‘make_required’ ); function make_required( $field ){ $field[‘custom_attributes’] = array( ‘required’ => ” ); return $field; }Continue reading
add_filter( ‘http_request_args’, ‘aioseo_filter_analyzer_timeout’, 1, 2 ); function aioseo_filter_analyzer_timeout( $args, $url ) { if ( ‘https://analyze.aioseo.com/v1/analyze/’ === $url ) { $args[‘timeout’] = 120; } return $args; }Continue reading
function reduce_woocommerce_min_strength_requirement( $strength ) { return 1; } add_filter( ‘woocommerce_min_password_strength’, ‘reduce_woocommerce_min_strength_requirement’ );Continue reading
function reduce_woocommerce_min_strength_requirement( $strength ) { return 1; } add_filter( ‘woocommerce_min_password_strength’, ‘reduce_woocommerce_min_strength_requirement’ );Continue reading
add_filter( ‘wc_add_to_cart_message’, ‘bbloomer_custom_add_to_cart_message’ ); function bbloomer_custom_add_to_cart_message() { global $woocommerce; $return_to = get_permalink(woocommerce_get_page_id(‘cart’)); $message = sprintf(‘%s %s‘, __(‘Great choice! 🙂 The product has been added to your cart.’, ‘woocommerce’), $return_to, __(‘Go to cart?’, ‘woocommerce’) ); return $message; }Continue reading