This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 4, | |
"alpha2": "af", | |
"alpha3": "afg", | |
"name": "Afghanistan" | |
}, | |
{ | |
"id": 8, | |
"alpha2": "al", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Pagination\Paginator; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Use this code only at Development @ Local Environment. DO NOT USE AT PRODUCTION SITE | |
* First, go to BillPlz for WooCommerce WordPress Plugin and then open file named `billPlzWoo.php` | |
*Then, copy and please this code. Only put the code line 19 and method named `enableHposForBillPlz` | |
*/ | |
protected function __construct() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author SulaimanMisri | |
* Load the logic | |
*/ | |
function makeShippingChangeBasedOnCartTotal( $cart ) { | |
if ( is_admin() && ! defined( 'DOING_AJAX' ) ) return; | |
$total = WC()->cart->subtotal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Muhamad Sulaiman Misri | |
*/ | |
trait TransformOrderTitle { | |
protected function orderTitle(): Attribute { | |
return Attribute::make( | |
/** | |
* This will show your string as Uppercase. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Muhamad Sulaiman Misri | |
*/ | |
const oldValueOfYourSelector = '{{ old('selector') }}'; | |
if (oldValueOfYourSelector !== '') { | |
$('selector').val(oldValueOfYourSelector); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Muhamad Sulaiman | |
*/ | |
$("selector").hide(); | |
$(function() { | |
$("selector").change(function() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Muhamad Sulaiman | |
* @link https://github.com/msulaimanmisri | |
*/ | |
function sm_wc_random_products( $args ) { | |
$orderby_value = isset( $_GET['orderby'] ) ? woocommerce_clean( $_GET['orderby'] ) : apply_filters('woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) ); | |
if ( 'random_list' == $orderby_value ) { |