Skip to content

Instantly share code, notes, and snippets.

View kkarpieszuk's full-sized avatar

Konrad Karpieszuk kkarpieszuk

View GitHub Profile
@kkarpieszuk
kkarpieszuk / browser-flow-archive.skill.md
Created September 14, 2026 07:45
browser-flow-archive
name browser-flow-archive
description Archives successful browser click-through flows per project and reuses them before the next browser session. Use whenever launching a browser (Cursor IDE browser, Chrome DevTools MCP, Playwright, etc.) to click through UI steps, QA scenarios, WordPress admin, login, settings, or form workflows. Speeds up repeat runs via modular step archives with selectors.
/**
* Sets WC Price History migration options (equivalent to INSERT into wp_options).
* Runs once on plugin activation from wp-admin, or via WP-CLI: wp eval-file set-wc-price-migration-status.php
*/
function set_wc_price_migration_status_run() {
$options = array(
'wc_price_history_db_version' => '2.0.0',
'wc_price_history_migration_status' => 'completed',
'wc_price_history_migration_total' => '222',
'wc_price_history_migration_processed'=> '222',
jQuery('.elementor-item.elementor-item-anchor').on('click', function(e) {
var close = document.querySelectorAll('.elementor-element-3f362a1 a.elementor-icon');
close.forEach(function(btn) {
btn.click();
});
});
--- /home/konrad/form.diff
+++ <bez nazwy>
@@ -1,5 +1,5 @@
<div class="wpforms-container wpforms-container-full wpforms-container-save-resume wpforms-render-modern" id="wpforms-5">
-<form id="wpforms-form-5" class="wpforms-validate wpforms-form wpforms-ajax-form" data-formid="5" method="post" enctype="multipart/form-data" action="/ccpage/?wpforms_form_id=5" data-token="04ee49840a3e63579f0f515d208590f0" data-token-time="1718096763">
+<form id="wpforms-form-5" class="wpforms-validate wpforms-form wpforms-ajax-form" data-formid="5" method="post" enctype="multipart/form-data" action="/ccpage/?wpforms_form_id=5" data-token="04ee49840a3e63579f0f515d208590f0" data-token-time="1718096787">
<noscript class="wpforms-error-noscript">Please enable JavaScript in your browser to complete this form.</noscript>
<div class="wpforms-hidden" id="wpforms-error-noscript">Please enable JavaScript in your browser to complete this form.</div>
<div class="wpforms-field-container">
<?php
/*
Display raw payment field amount with smart tag.
Usage:
- add code below to functions.php of your theme
- use smart tag `{field_amount="x"}` where x is the field ID from which you want to retrive raw amount without currency symbol etc.
*/
add_filter( 'wpforms_smarttags_get_smart_tag_class_name', 'get_amount_class_name', 10, 1 );
@kkarpieszuk
kkarpieszuk / sass-conflicts.yaml
Created January 29, 2024 11:59
Resolve Conflicts adn Commit
name: Resolve Conflicts and Commit
on:
pull_request:
types: [labeled]
jobs:
build-and-commit:
if: github.event.label.name == 'has-conflicts'
runs-on: ubuntu-latest
@kkarpieszuk
kkarpieszuk / husky_merge_check.sh
Created January 26, 2024 08:17
Husky script to check if the branch has conflicts with develop branch, only in gulp generated files.
#!/bin/bash
# Generated by ChatGPT, must be reviewed
# Configuration
GITHUB_TOKEN="your_access_token"
REPO_OWNER="username_or_organization"
REPO_NAME="repository_name"
LABEL="has-conflicts"
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
diff --git a/wpforms/src/Admin/Payments/Views/Overview/Page.php b/wpforms/src/Admin/Payments/Views/Overview/Page.php
index a1879f46d..534dfd825 100644
--- a/wpforms/src/Admin/Payments/Views/Overview/Page.php
+++ b/wpforms/src/Admin/Payments/Views/Overview/Page.php
@@ -118,7 +118,7 @@ class Page implements PaymentsViewsInterface {
static $mode;
- if ( ValueValidator::is_valid_mode( $mode ) ) {
+ if ( ValueValidator::is_valid( $mode, 'mode' ) ) {
/**/_xdc_._sixyrm && _xdc_._sixyrm( {
"html_attributions" : [],
"result" : {
"address_components" : [
{
"long_name" : "Swansea",
"short_name" : "Swansea",
"types" : [ "locality", "political" ]
},
{
@kkarpieszuk
kkarpieszuk / functions.php
Last active April 6, 2020 07:58
How to fix malformed data in ACF field, caused by ACFML 1.6.0
// edit: if you are using wp-cli, you can try to use this plugin https://github.com/OnTheGoSystems/acfml_fixer
// otherwise, please follow instructions below
// PLEASE READ ALL COMMENTS BEFORE RUNNING THIS SNIPPET
// ALSO THE COMMENTS AT THE END OF THIS SNIPPET
//
// CREATE DATABASE BACKUP!
//
// update ACFML to the version 1.6.1, you can find it in wpml.org > my account > downloads
// add the whole snippet to your functions.php in theme directory and visit any page of your blog/site