Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

TrueQAP trueqap

🎯
Focusing
View GitHub Profile
@trueqap
trueqap / trademark.php
Created Aug 21, 2021
Domains from which exceptions would be accepted.
View trademark.php
<?php
// Domains from which exceptions would be accepted.
$trademark_exceptions = array(
'yoast.com' => array( 'yoast' ),
'automattic.com' => array( 'akismet', 'akismet-', 'jetpack', 'jetpack-', 'wordpress', 'wp-', 'woo', 'woo-', 'woocommerce', 'woocommerce-' ),
'facebook.com' => array( 'facebook', 'instagram', 'oculus', 'whatsapp' ),
'support.microsoft.com' => array( 'bing-', 'microsoft-' ),
'trustpilot.com' => array( 'trustpilot' ),
'microsoft.com' => array( 'bing-', 'microsoft-' ),
@trueqap
trueqap / wp-config.php
Created Aug 20, 2021
WordPress: How to Disable All Emails & Notifications
View wp-config.php
<?php
// Place this function in the WP-CONFIG.PHP file.
function wp_mail(){}
@trueqap
trueqap / elementor.css
Created Aug 18, 2021
Elementor body>*:not example
View elementor.css
body>*:not(.elementor-page) article {
background-color: #212121;
padding: 20px;
margin-top: 20px;
}
body>*:not(.elementor-page) h1.page-title {
font-family: "Archivo Black", Sans-serif;
font-size: 38px;
text-transform: uppercase;
@trueqap
trueqap / style.css
Created Jun 11, 2021
Stripe checkout image size
View style.css
.woocommerce-checkout img.stripe-icon {
max-width: 30px;
}
@trueqap
trueqap / functions.php
Created Mar 29, 2021
Mennyiségi gombok WooCommerce archive oldalra
View functions.php
<?php
function custom_quantity_field_archive()
{
$product = wc_get_product(get_the_ID());
if (! $product->is_sold_individually() && 'variable' != $product->get_type() && $product->is_purchasable()) {
woocommerce_quantity_input(array( 'min_value' => 1, 'max_value' => $product->backorders_allowed() ? '' : $product->get_stock_quantity() ));
}
}
@trueqap
trueqap / reinstall.cli
Created Feb 22, 2021
WordPress plugins force reinstall with WPCLI
View reinstall.cli
wp plugin install $(wp plugin list --field=name) --force
@trueqap
trueqap / functions.php
Created Feb 11, 2021
Show Total number of sales
View functions.php
<?php
add_action( 'woocommerce_single_product_summary', 'show_total_number_of_sales', 11 );
function show_total_number_of_sales() {
global $product;
$units_sold = $product->get_total_sales();
if ( $units_sold ) echo '<p>' . sprintf( __( 'Összes eladás: %s', 'woocommerce' ), $units_sold ) . '</p>';
}
@trueqap
trueqap / bulk.sh
Created Jan 27, 2021
WooCommerce-Bulk-Delete-Product-With-WP-CLI
View bulk.sh
for run in {1..2}; do wp post delete $(wp wc product list --user=1 --format=ids --status=draft --per_page=100) --force; done
View lorem.html
<a class="button is-primary">
Button
</a>
<a class="button is-link">
Button
</a>
<a class="button is-info">
Button
</a>
<a class="button is-success">
View style.css
.et_boxed_layout #page-container, .et_boxed_layout #page-container .container, .et_boxed_layout #page-container .et_pb_row, .et_boxed_layout.et_non_fixed_nav.et_transparent_nav #page-container #top-header, .et_boxed_layout.et_pb_pagebuilder_layout.single #page-container .et_pb_row, .et_boxed_layout.et_pb_pagebuilder_layout.single.et_full_width_page #page-container .et_pb_row, .et_boxed_layout.et_pb_pagebuilder_layout.single.et_full_width_portfolio_page #page-container .et_pb_row, .et_fixed_nav.et_boxed_layout #page-container #main-header, .et_fixed_nav.et_boxed_layout #page-container #top-header, .et_non_fixed_nav.et_transparent_nav.et_boxed_layout #page-container #main-header {
width: 100% !important;
max-width: 100% !important;
margin: auto;
}