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
/** | |
* Bootstrap any application services. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
Component::macro('notify', function ($message, $title = '', $type = 'success') { | |
$this->dispatchBrowserEvent('notify', ['message' => $message, 'title' => $title, 'type' => $type]); | |
}); |
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\Nova; | |
use Laravel\Nova\Fields\BelongsTo; | |
use Laravel\Nova\Fields\Date; | |
use Laravel\Nova\Fields\ID; | |
use Illuminate\Http\Request; | |
use Laravel\Nova\Http\Requests\NovaRequest; |
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 | |
/* | |
Plugin Name: Free Downloads for WooCommerce | |
Plugin URI: http://www.damiencarbery.com | |
Description: Add free downloads to the My Account/Downloads page. | |
Author: Damien Carbery | |
Author URI: http://www.damiencarbery.com | |
Version: 0.1 | |
*/ |
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
<div x-data="{ bankAccounts: [{ | |
id: '', | |
accountNumber: '' | |
}] }"> | |
<template x-for="(bankAccount, index, bankAccounts) in bankAccounts" :key="index"> | |
<div class="grid grid-cols-6 gap-6 mt-2"> | |
<div class="col-span-3 md:col-span-3 sm:col-span-2"> | |
<x-jet-label for="city">Bank</x-jet-label> | |
<select :name="`bank_info[${index}][bank_id]`" id="bank" | |
class="border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md shadow-sm mt-1 block w-full"> |
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 Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\Schema; | |
class MigrateToJetstream extends Migration | |
{ | |
public function up() | |
{ |
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 break; | |
case 'download-product_version' : | |
$dl_id = $download['product_id']; | |
$version = esc_html( get_post_meta( $dl_id, 'version', true ) ); ?> | |
<span class="version"><?php echo $version; ?></span> | |
<?php break; | |
} |
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 | |
/** | |
* A tabbed woocommerce My Account page | |
* | |
* @package WooCommerce/Templates | |
* @version 3.0.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; |
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 | |
/* | |
* Add a hidden field to our WooCommerce login form - passing in the refering page URL | |
* Note: the input (hidden) field doesn't actually get created unless the user was directed | |
* to this page from a single product page | |
*/ | |
function redirect_user_back_to_product() { | |
// check for a referer | |
$referer = wp_get_referer(); | |
// if there was a referer.. |
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 | |
/** | |
* Skip cart and redirect to direct checkout | |
* | |
* @package WooCommerce | |
* @version 1.0.0 | |
* @author Alessandro Benoit | |
*/ | |
// Skip the cart and redirect to check out url when clicking on Add to cart |