Skip to content

Instantly share code, notes, and snippets.

View namncn's full-sized avatar

Nam NCN namncn

View GitHub Profile
<?php
function pixelplus_add_woo_custom_general_fields() {
global $woocommerce, $post;
echo '<div class="options_group">';
woocommerce_wp_checkbox(
array(
'id' => '_hot_product',
'label' => __( 'Sản phẩm Hot?', 'pixelplus' ),
@namncn
namncn / Woocommerce: woocommerce.php
Created June 23, 2020 14:59
Adjust the quantity input values
<?php
/**
* Adjust the quantity input values
*/
function pixelplus_woocommerce_quantity_input_args( $args, $product ) {
$args['step'] = '0.01';
return $args;
}
add_filter( 'woocommerce_quantity_input_args', 'pixelplus_woocommerce_quantity_input_args', 10, 2 );
<?php
namespace PixelPlus\Elementor\Widget;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Repeater;
<?php
namespace PixelPlus\Elementor\Widget;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Repeater;
<?php
namespace PixelPlus\Elementor\Widget;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
use Elementor\Widget_Base;
use Elementor\Controls_Manager;

Keybase proof

I hereby claim:

  • I am namncn on github.
  • I am namncn (https://keybase.io/namncn) on keybase.
  • I have a public key ASCprFcjmJQCC8njBIwKF8NTj4szppXtlAgr2mthlNexcgo

To claim this, I am signing this object:

<?php
add_action('wp_head', 'prefix_add_googleanalytics');
function prefix_add_googleanalytics() { ?>
// Paste your Google Analytics code from Step 4 here
<?php }