Skip to content

Instantly share code, notes, and snippets.

View mahdyar's full-sized avatar
🌱

Mahdyar Hasanpour mahdyar

🌱
View GitHub Profile
@mahdyar
mahdyar / functions.php
Created September 2, 2022 20:26
Hide the default "Add to cart" button and show a customized "Add to cart" button in WooCommerce
<?php
/*
*
* Customized add to cart button for WooCommerce
* © mahdyar.me (hasanpour@mahdyar.me)
*
* Add this to the end of your template's "functions.php" file (without "<?php" at the begining of this file)
*
*/
@mahdyar
mahdyar / bustan.js
Last active May 29, 2024 10:27
پرکردن نظرسنجی‌های بوستان به صورت خودکار | Select Bustan survey checkboxes
var allInputs = document.getElementsByTagName("input");
for (var i = 0, max = allInputs.length; i < max; i++){
if (allInputs[i].type === 'checkbox' && allInputs[i].id.endsWith('_8'))
allInputs[i].checked = true;
}