Skip to content

Instantly share code, notes, and snippets.

View nicomollet's full-sized avatar

Nico Mollet nicomollet

View GitHub Profile
@nicomollet
nicomollet / 5955-after-account-fr.png
Last active June 17, 2026 09:07
QA screenshots — PR #5962 — #5955 fr_FR translation fallback
5955-after-account-fr.png
@nicomollet
nicomollet / QA-5942-evidence.md
Created June 11, 2026 17:01
QA #5942 — E2E browser test screenshots

QA #5942 — E2E Test Evidence

Screenshots taken during the QA run

1. Baseline: Never Cache list WITHOUT /pricing/

  • wpr-wcpbc-price-cache script IS enqueued on pricing page (AC2 baseline)
  • Prices display: €299, €119, €30

2. AC1 + AC3: Never Cache WITH /pricing/ added

  • wpr-wcpbc-price-cache script is NOT present in loaded scripts
@nicomollet
nicomollet / e2e-5913-consent-banner.png
Last active June 9, 2026 13:37
QA screenshots — PR #5914 fix/5913-termly-gtm-header
@nicomollet
nicomollet / 5907-en-pricing-regression.png
Created June 8, 2026 10:49
QA screenshots — PR #5907 [ja] Pricing page empty strings fix
5907-en-pricing-regression.png
@nicomollet
nicomollet / 5449-blog-author-block.png
Last active June 3, 2026 10:32
wp-rocket.me QA screenshots
5449-blog-author-block.png
@nicomollet
nicomollet / button-datamodal.js
Last active November 14, 2023 13:29
WordPress block editor: add data-modal attribute to button block.
/**
* Button block, add a "data-modal" attribute.
*
* @author Nicolas Mollet, inspired by Marie Comet
* @see https://mariecomet.fr/en/2021/12/14/adding-options-controls-existing-gutenberg-block/
*/
const { __ } = wp.i18n;
// Enable custom attributes on Button block
const enableSidebarSelectOnBlocks = [
@nicomollet
nicomollet / YoutubeMusicScript.user.js
Last active May 13, 2024 09:30
YouTube Music userscript: moves the Save to library button in the player bar
// ==UserScript==
// @name YouTubeMusicScript
// @description YouTubeMusicScript
// @include http://music.youtube.com/*
// @autho Nicolas Mollet
// @version 1.2
// ==/UserScript==
// Observe play-button clicks.
@nicomollet
nicomollet / catch-plugin-deactivation-cause.php
Last active September 29, 2023 07:54
WordPress: catch plugin deactivation and write log of cause of deactivation.
<?php
/**
* Catch plugin deactivation and write log of cause of deactivation (manual or error).
*
* Examples:
* [29-Sep-2023 07:40:40 UTC] Plugin antispam-bee/antispam_bee.php was disabled manually.
* [29-Sep-2023 07:47:29 UTC] Plugin antispam-bee/antispam_bee.php was disabled because Plugin file does not exist.
*
* @param string $plugin Path to the plugin file relative to the plugins directory.
@nicomollet
nicomollet / woocommerce-mail-callback-params.php
Last active November 30, 2022 13:28
WooCommerce Mail Params: customize "To" recipient with billing firstname and lastname along to the email for better email delivrability
<?php
/**
* WooCommerce: override mail params
* @param $params
* @param WC_Email $email
*
* @return mixed
*/
public function custom_woocommerce_mail_callback_params( $params, \WC_Email $email ){
@nicomollet
nicomollet / woocommerce-most-sold-query.sql
Created January 20, 2022 14:23
WooCommerce most/least sold products Mysql query
# Exclude product variations since they don't include the "total_sales" meta key filled by WooCommerce
SELECT ID, post_title, post_status, post_modified, meta_value
FROM wp_posts
INNER JOIN wp_postmeta ON wp_postmeta.post_id=wp_posts.ID
AND wp_postmeta.meta_key='total_sales'
WHERE post_type='product'
ORDER BY CAST(`wp_postmeta`.`meta_value` as UNSIGNED) DESC;