Blog

Show MySQL User List

User ssh show mysql db user list Assistant To **show a list of MySQL users** via SSH, follow these steps: — ### ✅ **Step-by-step Instructions** 1. **SSH into your server**: ssh username@your-server-ip 2. **Login to MySQL (as root or a user with `SELECT` privilege on `mysql` database)**: mysql -u root -p 3. **Run the following […]

Custom WooCommerce Order Status

User woocommerce_order_status_dispensing explain above code Assistant The code or phrase `woocommerce_order_status_dispensing` looks like a **custom WooCommerce order status** hook or action. Here's a detailed explanation: — ### 🔹 What is `woocommerce_order_status_{status}`? WooCommerce uses **action hooks** like: woocommerce_order_status_{status} …where `{status}` is replaced by the actual **order status key**, such as `completed`, `pending`, `processing`, etc. So, for […]

WooCommerce dispensing status PDF

User add_action( 'woocommerce_order_status_dispensing', 'woocommerce_completed_order_invoice_date_issued' ); function woocommerce_completed_order_invoice_date_issued( $order_id ) { global $wpdb,$woocommerce; $order = new WC_Order( $order_id ); $order_status = is_callable( array( $order, 'get_status' ) ) ? $order->get_status() : $order->order_status; if ( $order_status == 'dispensing' ) { update_post_meta( $order_id,'_dispensed_date',date("Y-m-d")); } } add_action( 'admin_action_mark_dispensing', 'bulk_process_dispensing_status' ); function bulk_process_dispensing_status() { if( !isset( $_REQUEST['post'] ) && !is_array( $_REQUEST['post'] […]

WordPress Plugin Creation

User Create WordPress Standard plugin to submit in wordpress Assistant Here's a complete, clean, and structured example of a WordPress standard plugin ready to submit to the WordPress repository. This plugin demonstrates basic best practices and a clean, organized file structure. Assistant ### File structure for submission: my-first-wp-plugin/ ├── assets/ │ ├── css/ │ │ […]

Tech Maestro Profiled

User Describe me based on all our chats — make it catchy! Assistant You're a **tech maestro with a developer's edge and an optimizer’s obsession** — the kind who juggles Laravel, Vue, WordPress, and AWS like a digital ninja. Whether it's squeezing milliseconds off load times, decoding Docker quirks, or bending Elementor to your will, […]

Change Vue port

User change vue port localhost Assistant To change the default Vue app port (usually `localhost:5173` when using Vite), you can do it by modifying the Vite config or the `package.json` script. ### Option 1: Add port in `vite.config.js` If you have a `vite.config.js` file (or `vite.config.ts`), add this: // vite.config.js import { defineConfig } from […]

Advanced JS Topics

User javascript advance topics Assistant Here’s an overview of some advanced JavaScript topics that are important for becoming proficient in modern JavaScript development: — ### 1. **Asynchronous JavaScript** – **Promises:** Handling asynchronous operations. const fetchData = () => new Promise((resolve, reject) => { setTimeout(() => resolve('Data fetched'), 2000); }); fetchData() .then(data => console.log(data)) .catch(err => […]

useState Hook in React

User usestate in react Assistant `useState` is a Hook in React that lets you add **state** to functional components. ### 🔧 Syntax: const [state, setState] = useState(initialValue); – `state` is the current state value. – `setState` is the function to update the state. – `initialValue` is the starting value of the state. — ### 🧠 […]

Awork hour issue

User Also I'm not able add hours in awork because there is a some problem it always send me to prevdate when try to add hours Correct above sentence Assistant Sure, here’s the corrected version of your sentence: **"Also, I'm not able to add hours in Awork because there's an issue—it always redirects me to […]

Encrypt Client ID Accessor

User // Encrypt the IDs for each client item $clients->getCollection()->transform(function ($client) { $client->encrypted_id = Crypt::encrypt($client->id); return $client; }); add this in client model Assistant To move the logic of adding an `encrypted_id` to the **Client** model, you can create a custom **accessor** in the model. Here's how to do it cleanly: ### ✅ Step-by-step: #### […]