/** * WPCode Snippet: get_page_by_title Compatibility Helper * * This snippet provides a backward-compatible replacement for the deprecated * get_page_by_title() function that was removed in WordPress 6.2.0 * * To use this snippet: * 1. Go to WPCode > +…Continue reading
add_action(‘admin_head’, function () { echo ‘ ‘; });Continue reading
add_action( ‘init’, ‘export_all_completed_orders_test’ ); function export_all_completed_orders_test() { if ( isset( $_GET[‘export_customers’] ) && $_GET[‘export_customers’] === ‘1’ ) { if ( ! current_user_can( ‘manage_options’ ) ) { wp_die( ‘Access denied’ ); } header( ‘Content-Type: text/csv; charset=utf-8’ ); header( ‘Content-Disposition: attachment; filename=all_completed_orders.csv’…Continue reading
add_action(‘woocommerce_email_after_order_table’, ‘wcv_add_vendor_info_to_email’, 20, 4); function wcv_add_vendor_info_to_email($order, $sent_to_admin, $plain_text, $email) { if (!class_exists(‘WCV_Vendors’)) { return; // WC Vendors not active } // Collect vendor IDs from order items $vendor_ids = array(); foreach ($order->get_items() as $item) { $product_id = $item->get_product_id(); $vendor_id =…Continue reading