Skip to content

Instantly share code, notes, and snippets.

View saodat1998's full-sized avatar

Saodat saodat1998

View GitHub Profile

Colors

    primary: '#000000'
    secondary: '#000000'
    borderColor: '#000000',
    textColor: '#000000'

Actions: button, a

Problem

What we want to implement is Array.prototype.filter() function, just like the existing Array.prototype.filter(). Another similar function is _.filter() in underscore.js and lodash.js. The usage will be quite simple, like: [1, 2, 3, 4, 5].filter(num => num > 3) == [4, 5]

My solution:

Array.prototype.filter = function (func) {
$order = wc_create_order();
$order_id = trim(str_replace('#', '', $order->get_order_number()));
update_post_meta($order_id, '_customer_user', $user_id);

$linked_product = (int)get_post_meta( $course_id, 'linked_product', true );

$order->add_product( get_product($linked_product), 1); // This is an existing SIMPLE product

$coupon_code = $rec_coupon;

Saodat Sadirbaeva

I have no inhibitions about making my opinions known

Download CV

Web Developer | Software Engineer | Tashkent

Css

Tidy and mobile-friendly css needs some requirements to make the website faster:

  • Common css file, which is totally reusable in every page

It is not only styling for the elements that appear in every page, but also, writing the common class names and selectors. In this file you need to create your own markdown and use it in entire development process

  • Separate css file for every template, which is loaded if and only if template is included