Skip to content

Instantly share code, notes, and snippets.

View tizum's full-sized avatar
🏠
Working from home

Anderson T. Bento tizum

🏠
Working from home
View GitHub Profile
@liranop
liranop / expend shipping row
Last active August 11, 2023 05:58
Make shipping row in woocommerce cart and checkout to full width
/**
* @snippet Expend WooCommerce Shipping Row in Cart and Checkout
*/
add_action( 'wp_footer', 'expend_shipping_row_jscript', 9999 );
function expend_shipping_row_jscript() {
if ( is_cart() || is_checkout() && empty( $wp->query_vars['order-pay'] ) && ! isset( $wp->query_vars['order-received'] ) ) {
?>
<script type="text/javascript">
@UraraReika
UraraReika / jet-woo-builder-ajax-add-to-cart-with-variation-swatches.php
Last active January 21, 2024 17:17
Adding AJAX support for adding to cart
<?php
add_filter( 'jet-woo-builder/template-functions/product-add-to-cart-settings', 'wvs_pro_archive_variation_button_args', 999, 2 );
function wvs_pro_archive_variation_button_args( $args, $product ) {
$ajax_add_to_cart_enabled = 'yes' === get_option( 'woocommerce_enable_ajax_add_to_cart' );
if ( 'variable' === $product->get_type() ) {
$classname = WC_Product_Factory::get_classname_from_product_type( 'simple' );
$as_single_product = new $classname( $product->get_id() );
@oooh-boi
oooh-boi / gist:5d1f00ee8362292dba0af27700b05d74
Created January 7, 2020 18:51
OoohBoi Video Tutorial : Super-flexible Sections and Columns in Elementor PRO
/* MAGICAL CSS Rule */
selector .elementor-container .elementor-row {
flex-wrap: wrap;
/* uncomment for columns alignment */
/* justify-content: center; */
}
/* Responsive Columns Alignment - Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
selector .elementor-container .elementor-row {
@MjHead
MjHead / options-values-in-code.php
Last active May 5, 2024 03:33
Get option values for JetEngine options pages inside the PHP code
<?php
/**
* Method 1
* Can be used for: Any storage type
*
* page-slug - replace this with your Option Page slug
* option-name - replace this with your option Name/ID
*/
$value = jet_engine()->listings->data->get_option( 'page-slug::option-name' );
@diggeddy
diggeddy / Elementor - Check Radio button by default
Created January 2, 2018 00:08
Make a Elementor form radio button checked by default
/*---- JavaScript Check radio button ------*/
/*---- change ElementID to match the ------*/
<script type="text/javascript">
window.onload = function check() {
document.getElementById("form-field-LABEL-#").checked = true;
}
</script>