public function process_split_payment( $order ) { $vendors_due = WCV_Vendors::get_vendor_dues_from_order( $order, false ); $sub_accounts = array(); foreach ( $vendors_due as $vendor_id => $products ) { $_vendor_account = get_user_meta( $vendor_id, ‘_paystack_sub_account_code’, true ); $sub_accounts[] = array( ‘subaccount’ => $_vendor_account, ‘share’ => $calculated_share,…Continue reading
add_filter( ‘wp_revisions_to_keep’, function( $num, $post ) { return 10; }, 10, 2 );Continue reading
function wpo_ips_semaphore_lock_cleanup_interval() { return 7 * DAY_IN_SECONDS; // Modify the interval here. } add_filter( ‘wpo_ips_semaphore_lock_cleanup_interval’, ‘wpo_ips_semaphore_lock_cleanup_interval’ );Continue reading
function deletetransientsfromwc() { delete_transient( ‘wc_stripe_appearance’ ); delete_transient( ‘wc_stripe_blocks_appearance’ ); } add_action( ‘template_redirect’, ‘deletetransientsfromwc’ ); add_filter( ‘wc_stripe_upe_params’, function ( $stripe_params ) { $stripe_params[‘appearance’] = (object) [ ‘rules’ => (object) [ ‘.Input’ => (object) [ ‘padding’ => ’10px’, ] ], ]; return…Continue reading
/** * Elementor LCP Background Image Preloader v2.1 * * Extracts the EXACT URL from Elementor’s _elementor_data JSON * This ensures the preloaded URL matches what Elementor’s CSS requests * * WPCODE SETUP: * – Code Type: PHP Snippet *…Continue reading
/** * Elementor LCP Background Image Preloader v2.1 * * Extracts the EXACT URL from Elementor’s _elementor_data JSON * This ensures the preloaded URL matches what Elementor’s CSS requests * * WPCODE SETUP: * – Code Type: PHP Snippet *…Continue reading
add_action(‘doing_it_wrong_run’, function($function, $message, $version) { if ($function !== ‘_load_textdomain_just_in_time’) return; if (strpos($message, ‘dominio acf‘) === false && strpos($message, ‘domain acf‘) === false) return; $bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); // Recorta un poco para que sea legible $lines = []; foreach (array_slice($bt, 0,…Continue reading
/** * WooCommerce Checkout – Uppercase & Remove Accents * Backend sanitization για ασφάλεια */ // Αφαίρεση τόνων function wv_remove_greek_accents($string) { $accents = array( ‘ά’ => ‘α’, ‘έ’ => ‘ε’, ‘ή’ => ‘η’, ‘ί’ => ‘ι’, ‘ό’ => ‘ο’, ‘ύ’…Continue reading
// 1) Rimuove completamente l’area tabs add_action(‘wp’, function () { remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_product_data_tabs’, 10 ); }); // 2) Stampa la descrizione lunga al posto dei tabs add_action( ‘woocommerce_after_single_product_summary’, function () { global $post; if ( ! empty( $post->post_content ) )…Continue reading