mvp
This commit is contained in:
@ -27,8 +27,8 @@ class MembershipProducts extends DatabaseModel {
|
||||
public $databaseMatrix = [
|
||||
[ 'name', 'varchar', '128' ],
|
||||
[ 'description', 'text', '' ],
|
||||
[ 'monthly_price', 'int', '10' ], // must be int value greater than 99 IE $1.00 === 100, $4399.22 === 439922
|
||||
[ 'yearly_price', 'int', '10' ], // must be int value greater than 99 IE $1.00 === 100, $4399.22 === 439922
|
||||
[ 'monthly_price', 'int', '10' ], // must be int value greater than 99 IE $1.00 === 100, $4,399.22 === 439922
|
||||
[ 'yearly_price', 'int', '10' ], // must be int value greater than 99 IE $1.00 === 100, $4,399.22 === 439922
|
||||
[ 'stripe_product', 'varchar', '64' ], // not-required to create - generated by stripe after
|
||||
[ 'stripe_price_monthly', 'varchar', '64' ], // not-required to create - generated by stripe after
|
||||
[ 'stripe_price_yearly', 'varchar', '64' ], // not-required to create - generated by stripe after
|
||||
@ -166,7 +166,7 @@ class MembershipProducts extends DatabaseModel {
|
||||
|
||||
public function updateStripeYearlyPrice( $product, $yearly_price ) {
|
||||
$stripe->prices->update(
|
||||
$yearly->id,
|
||||
$yearly_price,
|
||||
['lookup_key' => ""]
|
||||
);
|
||||
return $this->createStripeYearlyPrice( $product, $yearly_price );
|
||||
@ -174,7 +174,7 @@ class MembershipProducts extends DatabaseModel {
|
||||
|
||||
public function updateStripeMonthlyPrice( $product, $monthly_price ) {
|
||||
$stripe->prices->update(
|
||||
$monthly->id,
|
||||
$monthly_price,
|
||||
['lookup_key' => ""]
|
||||
);
|
||||
return $this->createStripeMonthlyPrice( $product, $monthly_price );
|
||||
@ -208,7 +208,7 @@ class MembershipProducts extends DatabaseModel {
|
||||
if ( ! $data->count() ) {
|
||||
return false;
|
||||
}
|
||||
return $data->first();
|
||||
return $this->filter( $data->first() );
|
||||
}
|
||||
|
||||
public function mainProduct() {
|
||||
|
Reference in New Issue
Block a user