Dimas Maulana

Dimas Maulana

Developer

Welcome to my website! I am a developer with a current focus on React and Go. My experience encompasses both front-end and back-end development, enabling me to design and develop seamless and efficient applications.

Adding OneClick Chat to Order and WhatsApp Checkout in WordPress With Shipping Method

To add a One-Click Chat to Order feature and send checkout details via WhatsApp, including the shipping method, you can make modifications to the “wa_button.php” file in your WordPress theme or plugin. Here’s a step-by-step guide on how to achieve this:

  1. Open the “wa_button.php” file and locate the function where the WhatsApp message is being constructed. It might look something like this:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
function create_whatsapp_message($order) {
    // Existing code for creating the WhatsApp message
    $message = "Hello, thank you for your order!\r\n";
    // ...
    // More existing code
    // ...
    $date = $order->get_date_created()->format ('F j, Y - g:i A');
    // Add the shipping method information
    $shipping_method = "*Metode Pengiriman:*\r\n".$order->get_shipping_method()." ".$order->get_shipping_total()."\r\n";
    
    // Final output of the message
    $message .= "\r\n".$total_price."\r\n".$shipping_method."\r\n".$payment."\r\n*".$customer."* ".$address."\r\n\r\n".$thanks_label."\r\n\r\n(".$date.")";
    // Return the message
    return $message;
}
  1. Modify the existing code as shown above to include the shipping method information.

MAC OS Bash Path Location

In macOS, the system-wide PATH variable is defined by the contents of the /etc/paths file and the files within the /etc/path.d/ directory. These files determine the order and locations where the system looks for executable files when you run a command in the Terminal.

Here’s a breakdown of each of these components:

  1. /etc/paths:

    • This file contains a list of directories, one per line. These directories are automatically included in the system-wide PATH variable.

Restricting WooCommerce Cart to Only Allow One Item

If you’re running a WooCommerce store and want to ensure that customers can only have one item in their cart at a time, you can achieve this by adding a filter to your functions.php file. This will empty the cart whenever a new item is added, allowing only one product to be present in the cart at any given time.

Step 1: Adding the Filter

Open your theme’s functions.php file and add the following code:

Docker Limit Quota Folder

In this article, we will discuss how to create and mount a limited quota folder using Docker. This can be useful when you want to restrict the amount of disk space a specific folder can use within a Docker container.

Prerequisites

Before we begin, make sure you have Docker installed on your system. You can download and install Docker from the official Docker website (https://www.docker.com/).

Troubleshooting Making Buttonizer Visible in WordPress When Using W2static Plugin

If you’re facing difficulties with the visibility of the Buttonizer button on your WordPress site while using the w2static plugin, and you suspect that Buttonizer’s Ajax functionality might be causing the issue, you can attempt to resolve it by disabling the Ajax feature. Below are steps to guide you through the process:

1. Access Your WordPress Dashboard

Log in to your WordPress admin dashboard using your credentials.

Bash Scroll Won't Work

If you’re encountering difficulties scrolling through content in your Bash terminal while using the more or less commands, there are several troubleshooting steps you can take to address the issue. These commands are designed to display the contents of files or command outputs one screen at a time. If scrolling isn’t functioning as expected, consider the following solutions:

1. Utilize Keyboard Shortcuts

When using the more or less commands, you can employ the following keyboard shortcuts to navigate through the displayed content:

0%