<?php
add_filter('woocommerce_cart_shipping_packages', 'calculate_volumetric_weight_shipping');
function calculate_volumetric_weight_shipping($packages) {
$conversion_factor = 200; // Il fattore di conversione: 200 kg per m³
We can get list of changed files between 2 branches/commits by
$ tar --ignore-failed-read -vczf archive.tgz $(git diff --name-only --diff-filter=ACMRT master develop)
Let's see important part:
git diff master develop
:
Get differences between master and develop branches.
ln -s ../../../custom-plugins/* .
Associated Context | |
---|---|
Type | Code Snippet ( .sh ) |
Associated Tags | ln command custom plugins Frameworks SDKs Use cases Web development Front-end programming Custom plugin configuration Configuration management Framework: None symbolic link file linking |
💡 Smart Description | Displays custom plugins in a directory. * /../../custom-plugins/ and prints them to the console.Create symbolic links to custom plugins in the current directory from a specified location. |
"start": "webpack-dev-server --open --config ./webpack.dev.js --env writeToDisk",
Associated Context | |
---|---|
Type | Code Snippet ( .json ) |
Associated Tags | package.json GitHub: sidea2 webpack-dev-server open command config file writeToDisk function web development server configuration environment variable |
Associated Commit Messages | go |
/**
* Synchronizes ACF field groups from JSON files.
*
* This function is hooked to the `admin_init` action and is responsible for
* finding and importing any ACF field groups that have been defined in JSON
* files but have not yet been imported into the database.
*
export JAVA_HOME=$(update-alternatives --query javadoc | grep Value: | head -n1 | sed 's/Value: //' | sed 's@bin/javadoc$@@')
Associated Context | |
---|---|
Type | Code Snippet ( .sh ) |
Associated Tags | Java Home Update Alternatives Query Javadoc Grep Value head Command sed Command Framework: None JAVA_HOME update-alternatives javadoc environment variable |
📝 Custom Description | I ran this command in my project directory to build and package it:mvn clean javadoc:jar package |
I do have my JAVA_HOME variable set correctly.Evidently:$ which java/usr/bin/java$ sudo ls -... |
add_filter('woocommerce_product_export_row_data', 'your_theme_custom_export_data', 2, 999);
function your_theme_custom_export_data($row, $product)
{
foreach ($row as $row_name => $row_value)
{
// Check for 'description' or 'short_description' directly