Skip to content

Instantly share code, notes, and snippets.

View renanabraham's full-sized avatar

Renan Abraham renanabraham

View GitHub Profile
@rachids
rachids / settings.json
Last active August 13, 2024 16:16
Integrate Laragon's terminal (CMDer) to Visual Studio Code
{
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
@rafhaelhp
rafhaelhp / cart.ajax.php
Last active January 26, 2022 16:34
Correção atualizada para calculo de frete no carrinho WC
//CART SHIPMENT CALCULATE TO HIT CEP
case 'cart_shipment':
$CartTotal = 0;
$HeightTotal = 0;
$WidthTotal = 0;
$DepthTotal = 0;
$WeightTotal = 0;
$AmountTotal = 0;
$dimensoes = array();
@carmolim
carmolim / deleta_produtos.sql
Last active January 7, 2025 17:52
Deletar todos os produtos do woocommerce via SQL
DELETE relations.*, taxes.*, terms.*
FROM wp_term_relationships AS relations
INNER JOIN wp_term_taxonomy AS taxes
ON relations.term_taxonomy_id=taxes.term_taxonomy_id
INNER JOIN wp_terms AS terms
ON taxes.term_id=terms.term_id
WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type='product');
DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'product');
DELETE FROM wp_posts WHERE post_type = 'product';