Skip to content

Commit

Permalink
deploy: a02a1c9
Browse files Browse the repository at this point in the history
  • Loading branch information
kilbot committed Jul 2, 2023
1 parent 8684cd9 commit 418b8ce
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 5 deletions.
41 changes: 41 additions & 0 deletions Services_Settings.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ <h1 class="page-title">Source: Services/Settings.php</h1>
use WC_Payment_Gateways;
use WP_Error;
use WP_REST_Request;
use const WCPOS\WooCommercePOS\VERSION;

class Settings {

Expand Down Expand Up @@ -349,6 +350,46 @@ <h1 class="page-title">Source: Services/Settings.php</h1>
*/
return apply_filters( 'woocommerce_pos_payment_gateways_settings', $response );
}

/**
* Delete settings in WP options table
*
* @param $id
* @return bool
*/
public static function delete_settings( $id ): bool {
return delete_option( 'woocommerce_pos_' . $id );
}

/**
* Delete all settings in WP options table
*/
public static function delete_all_settings() {
global $wpdb;
$wpdb->query(
$wpdb->prepare( "
DELETE FROM {$wpdb->options}
WHERE option_name
LIKE '%s'",
'woocommerce_pos_%'
)
);
}

/**
* @return string
*/
public static function get_db_version(): string {
return get_option( 'woocommerce_pos_db_version', '0' );
}

/**
* updates db to new version number
* bumps the idb version number
*/
public static function bump_versions() {
add_option( 'woocommerce_pos_db_version', VERSION, '', 'no' );
}
}
</code></pre>
</article>
Expand Down
2 changes: 1 addition & 1 deletion woocommerce_pos_access_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Services_Settings.php.html">Services/Settings.php</a>, <a href="Services_Settings.php.html#line196">line 196</a>
<a href="Services_Settings.php.html">Services/Settings.php</a>, <a href="Services_Settings.php.html#line197">line 197</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion woocommerce_pos_checkout_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Services_Settings.php.html">Services/Settings.php</a>, <a href="Services_Settings.php.html#line155">line 155</a>
<a href="Services_Settings.php.html">Services/Settings.php</a>, <a href="Services_Settings.php.html#line156">line 156</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion woocommerce_pos_general_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Services_Settings.php.html">Services/Settings.php</a>, <a href="Services_Settings.php.html#line135">line 135</a>
<a href="Services_Settings.php.html">Services/Settings.php</a>, <a href="Services_Settings.php.html#line136">line 136</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion woocommerce_pos_license_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Services_Settings.php.html">Services/Settings.php</a>, <a href="Services_Settings.php.html#line222">line 222</a>
<a href="Services_Settings.php.html">Services/Settings.php</a>, <a href="Services_Settings.php.html#line223">line 223</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion woocommerce_pos_payment_gateways_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Services_Settings.php.html">Services/Settings.php</a>, <a href="Services_Settings.php.html#line309">line 309</a>
<a href="Services_Settings.php.html">Services/Settings.php</a>, <a href="Services_Settings.php.html#line310">line 310</a>
</li></ul></dd>


Expand Down

0 comments on commit 418b8ce

Please sign in to comment.